Jump to content
We've recently updated our Privacy Statement, available here ×

ioeth

Members
  • Posts

    7
  • Joined

  • Last visited

Community Answers

  1. ioeth's post in Setting max report pages at runtime in code, rather than in JasperReports config was marked as the answer   
    As it turns out, you can specify this functionality at runtime using code similar to the following:
    report.setProperty(MaxPagesGovernor.PROPERTY_MAX_PAGES_ENABLED, Boolean.TRUE.toString());
    report.setProperty(MaxPagesGovernor.PROPERTY_MAX_PAGES, String.valueOf(500));
    where report is a JasperReport object. The above code snippet would limit the size of a report to 500 pages.
×
×
  • Create New...