Search code examples
jasper-reports

iReport - PageFooter band error in "Print When Expression"


When I define Print When Expression to the Page Footer band as below I don't want to show this band in outer pages after page 1. But what is happening is that all elements of this band are being hidden , but still showing a blank region in all the pages corresponding to the size of the Page Footer band.

Definition of Print When Expression:

new Boolean($V{PAGE_NUMBER}.equals(new Integer("1")))

I'm using iReport 6.1.1


Solution

  • The pageFooter is a fixed band,not allowed to overflow, the report engine calculates there size not on content but on the band height which means that it will always be present with the band height you set...

    Quoting Teodord jasper report staff

    "I'm afraid there is no solution for what you want to achive"

    This is why in fact why jasper report introduced lastPageFooter, to enable the possibility to have a footer only on last page.

    Furthermore there was a feature request for firstPageFooter

    but it is Closed, No Change Required

    Your work around could be to use the title band (let it take the whole page..) or the background band, with a printWhenExpression