tschuler Posted August 7, 2006 Share Posted August 7, 2006 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! Thomas Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted August 8, 2006 Share Posted August 8, 2006 You can have the same effect using a conditional style for the same element. Try to use REPORT_COUNT instead of PAGE_COUNT as testing variable. Giulio Link to comment Share on other sites More sharing options...
tschuler Posted August 9, 2006 Author Share Posted August 9, 2006 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... ThomasPost edited by: tschuler, at: 2007/03/01 08:53 Link to comment Share on other sites More sharing options...
tschuler Posted August 9, 2006 Author Share Posted August 9, 2006 Post edited by: tschuler, at: 2006/08/09 07:57 Link to comment Share on other sites More sharing options...
tschuler Posted August 9, 2006 Author Share Posted August 9, 2006 See this file attached contains the problem beginning on page 2... Post edited by: tschuler, at: 2007/03/01 08:54 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