Help with a template design
Submitted by Matt C on Mon, 01/11/2021 - 13:26
Hello all!
We have a niggling problem where our statements seem to have desire to split over two pages despite there seemingly being a heap of room to add footers and headers. The result is an empty second page.
We have trimmed and snipped and pruned but can't seem to avoid the blank second page.
I've attached an anonymised screenshot of a previewed printout.
I've also attached our customised templates and subreports.
Anyone who has come across a similiar issue and solved it, would love to hear from you!
Re: Help with a template design
I suspect the Dummy Group footer band is exceeding the available space and forcing a new page.
This is not straight forward to debug. You can enable logging for JasperReports and it will give some details as to what its doing e.g.:
In your report, the page height is 595px, the bottom margin is 20px, and the page footer is 15px high.
The Dummy Group footer must therefore not exceed 595 - 20 - 15 = 560px in order to be not placed on the next page.
In the above, the Dummy Group footer started at offset Y=433px. In order to not start a new page, the Dummy Group footer height must be less than 560 - 433 = 127px.
In my test (not shown, as JasperReports doesn't log this information), the footer height evaluated to 135px so a new page was started.
Re: Help with a template design
So grateful Tim.
Knowing that, I'm sure we can fix it
Cheers!