In 2003 there was too much rain, in 2002 too little. But last year favorable weather brought Maryland farmers bumper crops, increasing their revenue by 18 percent.

Wheat farmers, whose revenue rose 60 percent, had the biggest gain.

Maryland farmers brought in $1.74 billion in cash receipts, according to a report released Tuesday by the Maryland Agricultural Statistics Service. That figure reflects gross sales by the state's roughly 12,000 farms in 2004.

The cash receipts figure tells just half the story. It does not reflect production costs, especially rising energy prices.

Farmers' gains varied depending on what they produced. The crops that showed the biggest gains over 2003 included field corn, up 36 percent, and vegetables, up 32 percent.

Maryland's leading commodity, in terms of receipts to farmers, was broiler chickens, with a record $628 million collected in 2004, a 27 percent increase over 2003. After broilers, the biggest commodities were greenhouse and nursery products ($360 million, up 11 percent), milk ($196 million, up 22 percent), field corn ($120 million) and soybeans ($112 million, up 30 percent).

The increases reflect "ideal growing conditions," said Norman Bennett, director of the Maryland field office of the U.S. Department of Agriculture's National Agricultural Statistics Service. "Everything just came together."

Even some crops whose prices sagged this year, such as soybeans and corn, still performed well because of record yields, according to the study.

"It rained," said Lynne Hoot, executive director of the Maryland Grain Producers Association. "And that makes all the difference."