tgs Posted October 1, 2010 Share Posted October 1, 2010 Hi,I'm struggeling in creating an invoice report with a variable carry over total sums in the column footer band on the first page if there is a second page, but not on the last page. I'm using iReport 3.7.3.This is what I have done:Variables:v_total_sumClass: java.lang.DoubleCalc.: SumReset: ReportIncrement: NoneExpression: $F{total}Init. Value Expr.: new Double(0)v_cur_pageClass: java.lang.IntegerCalc.: NothingReset: PageIncrement: NoneExpression: $V{PAGE_NUMBER}Init. Value Expr.: new Integer(0)v_max_pageClass: java.lang.IntegerCalc.: HighestReset: ReportIncrement: ReportExpression: $V{PAGE_NUMBER}Init. Value Expr.: new Integer(0) Now I have placed the variable v_total_sum on the Column Footer. The properties are:Print When Expr.: new Boolean($V{PAGE_NUMBER}.intValue() < $V{v_max_page}.intValue())I also tried: new Boolean($V{v_total_sum}.doubleValue() < $F{total}.doubleValue())with totally different results but not the right!?Text Field Expr.: $V{v_total_sum}Evaluation Time: Now This is working if invoice items on a second and further page, but not if only the Summary band is on the second page. I tried a lot and never got the results I need.I would be appreciate for help. Thanks in advance,ThomasIs nobody here to have to create invoices with carry over sum?Post Edited by tgs at 10/15/2010 09:09 Link to comment Share on other sites More sharing options...
tgs Posted October 15, 2010 Author Share Posted October 15, 2010 The soultion I need should normally quite be easy.- A carry over sum on the first page if there are invoice items and/or the total sum on the second page- Not if there is only one page- Not on the last page if two or more pagesI have tried a lot (look at the topic above) but without a professional result. Any help is appreciated,Thomas 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