Hello Tina,

I'm not sure exactly what you are doing, but it appears you need to do some calculations in your report. All calculations are generally part of the *report design procedure* and should not have anything to do with java code. JasperReports provides rich features to do everything from simple sum and average to complex mathematical calculations over whatever records you chose. And you can use all these features of JasperReports with iReport.

My

JasperReports book demonstrates the whole *design procedure* of reports that require logical, mathematical, or statistical calculations. You may want to go through the sample chapter (titled "Using Mathematical and Logical Expressions") of the

book that is available for free download:

http://www.packtpub.com/sites/default/files/downloads/0769os-chapter-9.zip
The chapter demonstrates and explains how to calculate the sum/average/maximum of a column or things like that.