Jasperreports: how to make the page footer always fixed at the bottom of each page?
Asked Answered
C

3

5

I have a problem with page footer in jasperreports. I want to keep the page footer fixed at the bottom of each page. If there is only one record in detail band, the footer comes right after the detail band in the middle of the page. I have set the "position type" of the elements in footer to "fix relative to bottom". but it doesn't work. I can not increase the height of detail band, because it will also increase the blank between each records. Can anyone help me? Thanks!

Custard answered 2/5, 2012 at 13:52 Comment(0)
N
10

Not sure @mdahlman's answer covers/fixes/understands the original question, but I could be wrong.

To have a page footer always appear at a fixed position at the very bottom of the page/paper, I believe that the best way is to place footer (fields/text/graphics) in the Background Band.

And make sure to have a PageFooter band with empty space, to make sure no Detail-data is printed on top of the fixed-footer in Background-band. You can still have a PageFooter with page-summary-fields printed, but you need empty space at bottom of PageFooter to accomodate for the fixed-footer in Background-band.

Neodymium answered 26/11, 2012 at 13:53 Comment(0)
R
1

Page footers are always at the bottom of the page. I don't think you can get the behavior you are describing. Column footers and group footers do what you are describing. But you can force a group footer to the bottom of the page using group property "Footer Position". Try setting it to "Force at bottom".

Rochellrochella answered 2/5, 2012 at 22:28 Comment(0)
B
0

Using positionType="FixRelativeToBottom" is best way to keep pagefooter at bottom of page.

<pageFooter>
    <band height="320">
     <frame><reportElement isRemoveLineWhenBlank="true"  stretchType="NoStretch"  x="0" y="0" width="607" height="318"  positionType="FixRelativeToBottom" />
Backman answered 12/6, 2017 at 10:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.