patistuta Posted August 31, 2014 Share Posted August 31, 2014 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. Link to comment Share on other sites More sharing options...
Tom C Posted August 31, 2014 Share Posted August 31, 2014 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. Link to comment Share on other sites More sharing options...
Solution Tom C Posted August 31, 2014 Solution Share Posted August 31, 2014 Please refer to this wiki article for a sample report:http://community.jaspersoft.com/wiki/how-keep-last-report-record-and-report-summary-information-together-even-when-pagination-occurs Link to comment Share on other sites More sharing options...
patistuta Posted September 1, 2014 Author Share Posted September 1, 2014 thank you for your replay, it works exactly as it should be Link to comment Share on other sites More sharing options...
jonny64 Posted January 19, 2016 Share Posted January 19, 2016 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 Link to comment Share on other sites More sharing options...
jonny64 Posted May 20, 2021 Share Posted May 20, 2021 What about table component? Does it have second detail band? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now