jpyeo Posted August 8, 2007 Share Posted August 8, 2007 I've done a report consisiting of 6 subreports in which the subreports have a total.I manage to get the subtotals to display in the main report by passing them through variables but i'm having problems adding them up. what i did in the main report is :1. Create a variable type double called TOTAL_COMMISSION2. In the expression of (1) new Double($P{A}.doublevalue() + $P{B}.doublevalue() + $P{C}.doublevalue() + $P{D}.doublevalue()+ $P{E}.doublevalue()) 3. Place the variable in the summary band (tried all other bands as well!) and set the evaluation time to 'report' (as well as all other possible options!). The value of TOTAL_COMMISION always return 'null' eventhough all the variables are not null. Someone please enlighten on this issue. Really would aprreciate it. Thanks again! Link to comment Share on other sites More sharing options...
szaharia Posted August 8, 2007 Share Posted August 8, 2007 Hi, Could you post a sample here which can reproduce the problem? It will make things more explicit.Until then, I just can tell you that doublevalue() is undefined for the Double class (use doubleValue() instead). Also you were talking about variables, but your notations were parameter-like, not variable-like.How did you tested your 5 variables against null? hth,sanda Link to comment Share on other sites More sharing options...
jpyeo Posted August 9, 2007 Author Share Posted August 9, 2007 shertage, thx for the reply. please view the attachment jxrml file. On the top right are values of subreport passed on to the main report. At the bottom right, the total commision is the summation of all the variables passed from the subreports. which is returning null. [file name=Commision_Statement_MthYear.pdf size=7993]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Commision_Statement_MthYear.pdf[/file] Post edited by: jpyeo, at: 2007/08/09 01:55 Link to comment Share on other sites More sharing options...
jpyeo Posted August 9, 2007 Author Share Posted August 9, 2007 this is the .jxrml file for the subreport [file name=Commision_Statement_Nest_Adjustment_Details_MthYear.jrxml size=9693]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Commision_Statement_Nest_Adjustment_Details_MthYear.jrxml[/file] Post edited by: jpyeo, at: 2007/08/09 01:59Post edited by: jpyeo, at: 2007/08/09 02:00 Link to comment Share on other sites More sharing options...
jpyeo Posted August 9, 2007 Author Share Posted August 9, 2007 this is the .jxrml for the main report [file name=Commision_Statement_MthYear.jrxml size=28934]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Commision_Statement_MthYear.jrxml[/file] Link to comment Share on other sites More sharing options...
szaharia Posted August 9, 2007 Share Posted August 9, 2007 Hi, I think it would be better if you don't use the intermediate TOTAL_COMMISSION variable. Just write in your textfield expression new Double(2*($V{SUB_OVERRIDING}.doubleValue())) instead of $V{TOTAL_COMMISSION}. Doing so you keep staying bound to the SUB_OVERRIDING variable. hth,sanda Link to comment Share on other sites More sharing options...
jpyeo Posted August 10, 2007 Author Share Posted August 10, 2007 thxs alot!! .. Really apreciate your assistance!. IT WORKED!... Will log in more to help others in the future!.. . rds. Link to comment Share on other sites More sharing options...
jpyeo Posted August 10, 2007 Author Share Posted August 10, 2007 thxs alot!! .. Really apreciate your assistance!. IT WORKED!... Will log in more to help others in the future!.. . rds. 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