I'm loading a JasperReports report (.jasper file) in an iFrame through a Servlet, and the report data is coming fine.
However, there is an issue with the way the pagination is being done. I want there to be a page-break after every 10 records, and the subsequent records should come in the next page.
The pagination code I have written in the JXRML file is:
<break>
<reportElement x="0" y="23" width="802" height="15">
<printWhenExpression>
<![CDATA[new java.lang.Boolean((int)($V{REPORT_COUNT}.intValue()) %10 == 0)]]>
<!--![CDATA[$V{REPORT_COUNT}%2==0]]-->
</printWhenExpression>
</reportElement>
</break>
While the pagination also works with this, it shows multiple pages in the same screen - one below the other (Page 1 of 2 is shown, then below it Page 2 of 2 is shown). Here's a screenshot of what it looks like:
How can I fix this? I have tried searching on the JasperReports tutorials and community forum but couldn't find a solution.