michaela.camson Posted July 14, 2014 Share Posted July 14, 2014 Hi everyone;I've posted this question a week ago yet still unsolve. So i'm trying to post again hope to get more answers. My Problem is about how to set the variable first Group Total Column equals to 0. 0 should be fix it should be display as the first Group Total and the second Group Total will just be 0 + the sum of the 1st principal of the items. Sample: Items Principala. 10b. 2Sub Total 0c. 4d. 6Sub Total 12e. 15Sub Total 22Please Help! ! !Thank you for the help in advanceMichaela Link to comment Share on other sites More sharing options...
rajesh.sirsikar Posted July 14, 2014 Share Posted July 14, 2014 Hi Michaela, After some struggle I realized it is complicated to get the data the way you have described. But In teh attached report I have cretaed most probable two types of total fields. 1) Items Principal a. 10 b. 2 Sub Total 0 c. 4 d. 6 Sub Total 10 e. 15 Sub Total 25 OR 2) Items Principal a. 10 b. 2 Sub Total 12 c. 4 d. 6 Sub Total 22 e. 15 Sub Total 37 Please find attached report. Link to comment Share on other sites More sharing options...
michaela.camson Posted July 15, 2014 Author Share Posted July 15, 2014 Hi thank you so much for the answer. But it didn't work for me i added 3 variable the Group No, TotalAdd , and the Variable 1. I followed your steps but then the answer came out to be the whole total of the sum of principal and it didn't starts with zero. What Do you think the problem is? Thanks for the help, Any help is greatly appreciated. Michaela Link to comment Share on other sites More sharing options...
rajesh.sirsikar Posted July 15, 2014 Share Posted July 15, 2014 Hi Michaela, Can I see a screenshot of the report or just the jrxml file. Otherwise it will be difficult to understand whats the problem is... Rajesh Link to comment Share on other sites More sharing options...
michaela.camson Posted July 17, 2014 Author Share Posted July 17, 2014 Hi Rajesh, Thank you so much for responding. And thank you so much for the help..Anyway this is the variable I made... <variable name="NetProceed1" class="java.lang.Long" resetType="Group" resetGroup="Loan Date" calculation="Sum"><variableExpression><![CDATA[$F{Net Proceed}]]></variableExpression></variable><variable name="Variable_1" class="java.lang.Long" resetType="Group" resetGroup="Loan Date" calculation="Sum"><variableExpression><![CDATA[$V{NetProceed1}.intValue()]]></variableExpression><initialValueExpression><![CDATA[0.00]]></initialValueExpression></variable><variable name="GroupNo" class="java.lang.Integer" resetType="Group" resetGroup="Loan Date" calculation="Count"><variableExpression><![CDATA[$F{Loan Date}]]></variableExpression><initialValueExpression><![CDATA[0.00]]></initialValueExpression></variable><variable name="Variable_2" class="java.lang.Integer" resetType="Group" resetGroup="Loan Date" calculation="Sum"><variableExpression><![CDATA[iF(EQUALS($V{GroupNo},1),0,$V{NetProceed1}.intValue())]]></variableExpression></variable><group name="Loan Date"><groupExpression><![CDATA[$F{Loan Date}]]></groupExpression></group></subDataset><queryString language="SQL"> Link to comment Share on other sites More sharing options...
michaela.camson Posted July 17, 2014 Author Share Posted July 17, 2014 And then in Subtotal NetProceed1 = 40 690.00 This One is correct that value is the sum of the first group. Variable_1 = 704, 066.00 Variable_2 = 702,836.00 Group No = 34 the group number is counting the items and not the group... What do you think is the Problem? Thanks A lot for the help.. It is greatly appreciated Best regards, Michaela Link to comment Share on other sites More sharing options...
michaela.camson Posted July 21, 2014 Author Share Posted July 21, 2014 Hi Rajesh,Thank you so much for the help I have figured out the solution... Thanks,Michaela 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