I have created a report table. I have set it to display 5 rows of data per page. The problem now is when there are less than 5 rows of data the table will not appear.
What you can do is to create a dummy group with 'minHeightToStartNewPage' property set to something like 700/800 (depends on your report design) for 'portrait' and 500/550 (depends on your report design) for 'Landscape' setup. You can then set the value of printWhenExpression for this dummy group as '$V{REPORT_COUNT} % 5 == 0'.
NOTE: If the value of minHeightToStartNewPage is not set correctly (more than the length of page), it can run into infinite loop problems.