Jump to content
Changes to the Jaspersoft community edition download ×

Evaluation time of expressions


Recommended Posts

Hi all!


I've got a question about eval times and bands...


I defined two bands in a report representing even and odd to realize a switch between to different background colours of lines of a table (both bands containing the same text fields but different background colurs). To realize the switch I use "print when expression", e.g. for the evenband


$V{PAGE_COUNT}.intValue() % 2 == 0 ? Boolean.TRUE : Boolean.FALSE


and for the odd band


$V{PAGE_COUNT}.intValue() % 2 == 1 ? Boolean.TRUE : Boolean.FALSE


It works fine for the first page of the report, but not on the following pages - all of the following pages contains the first two lines marked as odd although the value of the first row $V{PAGE_COUNT} is 0 and of the second row is 1, third is 2 and so on...


Could it be possible, that the evalution times are different? What's the matter?


Thanks in advance!



Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Hi Giulio!


Thanks for the quick answer - but it won't help me. Unfortunately the phenomenon doesn't occur if the number of lines in the report page is even. If it's odd - then the expression for the even band will be evaluated to even...


See the attached PDFs for more details...the column NAME contains REPORT_COUNT and PAGE_COUNT - the first file contains a pagefooter and this causes with given dimensions that the number of lines is even. If the footer is removed that number of lines is odd (one more) and this causes the problem...



Post edited by: tschuler, at: 2007/03/01 08:53

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...