denys Posted October 14, 2009 Share Posted October 14, 2009 HiI need to introduce the "totals" line at the end of report, but unfortunately I am not able to grasp on the way to do it so would appreciate any help. So far i managed to create variable that would hold value needed to display: <variable name="TOTAL_SALE" class="java.lang.Double" calculation="Sum"> <variableExpression><![CDATA[$F{sale_total}]]></variableExpression> <initialValueExpression><![CDATA[new java.lang.Double(0)]]></initialValueExpression> </variable> I don't want this "totals" line to be on column nor page footers - i.e. it should be only on last page but right after last data record.So I tried it the following way <details> <band> ...DATA BAND... </band> <band> <printWhenExpression><![CDATA[]]></printWhenExpression> ...TOTALS BAND... </band> </details> but I don't understand how to check for current page being the last one. Thanks in advance. Link to comment Share on other sites More sharing options...
giobby Posted October 14, 2009 Share Posted October 14, 2009 hi denys i'm not able with english and also not able with reports...but if i've understand what is your problem (and humbly i've to say that i'm not sure...) you should only put your "total" variable in a text field situated in the summary band and not in details one. but if you want to be sure to fix the problem you should waiting for another one's reply (...another one more expert than me) Giovanni...La puissance est rien sans controle... Link to comment Share on other sites More sharing options...
denys Posted October 14, 2009 Author Share Posted October 14, 2009 perfect! thank you so much, that is exactly what I needed to do. 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