Jump to content
Changes to the Jaspersoft community edition download ×

how to show a variable not on last page?


tgs

Recommended Posts

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_sum

Class: java.lang.Double

Calc.: Sum

Reset: Report

Increment: None

Expression: $F{total}

Init. Value Expr.: new Double(0)

v_cur_page

Class: java.lang.Integer

Calc.: Nothing

Reset: Page

Increment: None

Expression: $V{PAGE_NUMBER}

Init. Value Expr.: new Integer(0)

v_max_page

Class: java.lang.Integer

Calc.: Highest

Reset: Report

Increment: Report

Expression: $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,

Thomas

Is 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

  • 2 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 pages

I 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...