how to display data less than 5 row in jasper reports

后端 未结 2 394
难免孤独
难免孤独 2021-01-07 08:51

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.

2条回答
  •  情歌与酒
    2021-01-07 09:52

    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.

提交回复
热议问题