2005 IR Help Posted August 26, 2006 Share Posted August 26, 2006 By: LL - lovelyliatroim Grand Total of sub totals 2004-08-06 03:11 I have a master report which contains 3 sub reports, each sub report creates a sub-total, i need to produce a grand total of the sub-totals which is shown in the master report!! I have each sub-report returning me there sub-total, problem that i have is this, each sub-report uses the same sub-report.jrxml,i just pass in the a different query for each sub-report(so i am using the same hashmap for each sub-report), when one sub-report runs it returns its sub-total, at this stage i need to add this sub-total to the master total, how or where do i do this, i have each sub-report in a groups-header, does a groups footer get called first before the next group(or subreport is called??) Im assuming that at the moment, so im trying to add the returned value(from subreport) to a variable(grand total), now this is giving me trouble, i have a variable called "Total"(Grand Total) of type Double and when in the group footer when i try to add the sub-total to the grand total it complains telling me that "Unexpected Type", requires variable and found value, heres what is in my textfield expression ($V{Total} = new Double($V{Total}.doubleValue() + new Double($P{ReturnedValuesMap}.get("RunningTotal").toString()).doubleValue())) $V{Total} is of type double!! I have a feeling that my report design is wrong, i.e the fact that im adding up the grand total in the footer!! Im open to any suggestions as to change my design to get the desired effect!! cheers for help, LL Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now