aspose file tools*
The moose likes Other Open Source Projects and the fly likes Is it possible to calculate total within the ireport parameter? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Is it possible to calculate total within the ireport parameter?" Watch "Is it possible to calculate total within the ireport parameter?" New topic
Author

Is it possible to calculate total within the ireport parameter?

Tina Ma
Ranch Hand

Joined: Nov 29, 2007
Posts: 198
I am building up the object which will be printed out using ireport. At present I am calculating the totals in my java code. Is it possible to pass over the calculation burden to ireport? Is it possible to put a parameter in the ireport which will command it to calculate the total and display that value based on the values in the column displayed so far?


Tina
SCJP 1.4, SCWCD 1.4
bilal sidiqui
Author
Greenhorn

Joined: Aug 09, 2010
Posts: 17
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.


Bilal Siddiqui, Author of JasperReports 3.6.0 Development Cookbook
 
 
subject: Is it possible to calculate total within the ireport parameter?