total gets printed on new page

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email with questions or issues requiring TIBCO review or response.

I have report that print total at the end, i put the total textField in Summary band,and I made it Float so that it is always printed directly after the last row of the report.
the problem appears when the table rows fill the entire page, then the total gets printed in new page. my client does not like this, he says this report is unreadable.
he suggested one solution that I should always stick the total with the last row, if there is no space for the total in the page that the last row gets printed with it in new page not only the total.
how can I do that? beside i am open to new ideas to make the report readable for the client without putting the total alone in new page. 
patistuta's picture
Joined: Jun 28 2013 - 4:45am
Last seen: 7 years 10 months ago

In my report I've got table component, how can I do the same?

I need to tie summary to table element last row and print page totals together with this row only if summary overlap to the next page

jonny64 - 6 years 5 months ago

2 Answers:

Please refer to this wiki article for a sample report:

tchen's picture
Joined: Feb 27 2008 - 7:33am
Last seen: 2 days 4 hours ago

thank you for your replay, it works exactly as it should be

patistuta - 7 years 10 months ago

What about table component? Does it have second detail band?

jonny64 - 1 year 1 month ago

First get the total row count in your report query, then add the print when condition to your report detail section $V{REPORT_COUNT} < $F{total row count}. Add a second detail section with a larger band height to contain the same contents as the original report detail section plus theyour report totals placed below the original detal content. The print when expression for the new detail section is $V{REPORT_COUNT} == $F{total row count}.

This will force JR engine to treat the last record and your report total as one detail line with taller height to allow them stay together when pagination occurs.

tchen's picture
Joined: Feb 27 2008 - 7:33am
Last seen: 2 days 4 hours ago