We have developed a practical approach for the inclusion of magnetic fields in the nonequilibrium Green's function method and we have formulated a general scheme for transport calculations in a multiterminal device with magnetic field. Formulas for the self-energy terms in the presence of magnetic fields have been derived and disorder effects in the potential have been introduced through a model accounting for scattering by impurities. To demonstrate the validity of the model, we have applied it to the quantum Hall effect (QHE), for which a wealth of experimental results and information is readily available. Calculations for a simple structure at zero temperature were first carried out to verify the properties of the solutions over a wide range of conditions. The calculated Green's function results provide the carrier density distribution in the structure, and in order to analyze the QHE results, the resistances ${R}_{\mathrm{xx}}$ and ${R}_{\mathrm{xy}}$ are obtained using B\uttiker's approach. Our results for the integer QHE show a pattern that clearly resembles the edge state picture of transport. To further validate the theoretical model, comparisons have been conducted with experimental results for a realistic quantum Hall device at finite temperature, obtaining good agreement.