How do I set the number of rows to be displayed per page in a report using iReports. Ex: if i have 100 records, I wasnt to display 10 per page and then break. The default behavior is to cram all the records possible in the page.
Ok! Found a way to accomplish this!
Details
band.new java.lang.Boolean((int)($V{REPORT_COUNT}.intValue())%10==0)
where 10 is the number of records per page.
This is how it is done in iReports. The jrxml equivalent for people directly editing the file is as below.
<break>
<reportElement x="0" y="23" width="100" height="1">
<printWhenExpression><![CDATA[new java.lang.Boolean((int)($V{REPORT_COUNT}.intValue())%10==0)]]></printWhenExpression>
</reportElement>
</break>
Put this just after the <band>
tag under <details>
tag.
It depends on the page height you set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With