  We present a spin-rotation-invariant Green-function theory of long- and
short-range order in the ferro- and antiferromagnetic Heisenberg model with
arbitrary spin quantum number S on a stacked square lattice. The thermodynamic
quantities (Curie temperature T_C, N\'eel temperature T_N, specific heat C_V,
intralayer and interlayer correlation lengths) are calculated, where the
effects of the interlayer coupling and the S dependence are explored. In
addition, exact diagonalizations on finite two-dimensional (2D) lattices with
S>=1 are performed, and a very good agreement between the results of both
approaches is found. For the quasi-2D and isotropic 3D magnets, our theory
agrees well with available quantum Monte Carlo and high-temperature
series-expansion data. Comparing the quasi-2D S=1/2 magnets, we obtain the
inequalities T_N>T_C and, for small enough interlayer couplings, T_N<T_C. The
results for C_V and the intralayer correlation length are compared to
experiments on the quasi-2D antiferromagnets Zn_2VO(PO_4)_2 with S=1/2 and
La_2NiO_4 with S=1, respectively.
