File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Sum of columns in iReport Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Sum of columns in iReport" Watch "Sum of columns in iReport" New topic
Author

Sum of columns in iReport

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
I am using iReport for developing report
I am using joins for getting data from 4 different tables mysql.
For getting the sum of columns i am using the expression "new Double($F{a}.doubleValue()+$F{b}.doubleValue()+$F{c}.doubleValue())", where a,b,c are in tables a,b,c respectively.
if value of a is null, then the overall sum returned is null regardless of value in b and c column.
For example, row with id 1 is not present in table a, table b, but exists in table c, but still the overall sum returned is null
How to solve this problem?


kunal
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sum of columns in iReport
 
Similar Threads
using group by clause wih multiple tables
Problem while inserting into the table
Getting data for columns from different tables having same name
Trouble with model for calculating and adding table values dependent on multiple rows
GPA Program ... Error Again....In JCreator