How to use jasper reports to print something only on the first page ?

Posted by Harsha on Stack Overflow See other posts from Stack Overflow or by Harsha
Published on 2010-05-21T17:15:20Z Indexed on 2010/05/23 15:20 UTC
Read the original article Hit count: 326

Filed under:

How to use jasper reports to print something only on the first page. I am using jasper reports for printing invoices and only on the 1st page I need to print the Remit Payment To section with the address following it. Customer address is also present there. The way it is currently designed is that this goes into pageFooter section and we use printWhenExpression(PAGE_NUMBER = 1) so that this only gets printed on the 1st page of the invoice. But the downside of this approach is that the jasper engine reserves the size equivalent of the page footer on all the other pages (1..n) of the invoice. So we are able to use only about 2/3 rd of all pages. Remaining 1/3rd page which is for page footer is blank for all pages except the 1st page. This increases the number of pages. Any ideas for fixing this issue?

© Stack Overflow or respective owner

Related posts about jasper-reports