Break the PDF document after 100 pages

前端 未结 2 474
囚心锁ツ
囚心锁ツ 2021-01-25 08:11

I am working with JasperReports and iReport tool. One of the requirements the client wants is that the PDF file will be generated to a 100 page document only.

Could you

2条回答
  •  再見小時候
    2021-01-25 08:30

    In the iReport you can find a built in variable PAGE_COUNT. For every element in the detail band you can put the following in the "Print when expression" textbox:

    Boolean.valueOf($V{PAGE_COUNT}.intValue() < 100)
    

    This will stop printing after page number 100.

提交回复
热议问题