In this short article, I want to share the information that I received from our engineering team and that I believe will be helpful for JasperReports fans :) The main goal of this article is to show how to implement the page break if the table component hit the pre-defined limit of the records per one page.
In the sample that is described below the limit of the records after which the page break will be inserted is equal to 10.
To implement this solution:
add the table component to your report
open the DataSet associated with this report and add to it the Group (I've called it pageBreakGroup)
set Group expression to
(int)(($V{REPORT_COUNT} - 1) / 10)
- check 'Start on a new page' property
Please find in the attachment to this article the jrxml sample of the report that has been described above.
Thank you for your attention to this article.
Alex
Recommended Comments