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.
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: