Help with a template design

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!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

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.:

...
[DEBUG,JRVerticalFiller,qtp418978254-100 - admin] Fill 1: detail at 353
[DEBUG,JRVerticalFiller,qtp418978254-100 - admin] Fill 1: Statement Group footer at 366
[DEBUG,JRVerticalFiller,qtp418978254-100 - admin] Fill 1: Dummy Group footer at 433
[DEBUG,JRVerticalFiller,qtp418978254-100 - admin] Fill 1: page footer at 560
[DEBUG,JRVerticalFiller,qtp418978254-100 - admin] Fill 1: page header at 20
...

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!

Syndicate content