Jump to content
We've recently updated our Privacy Statement, available here ×
  • Limit the number of records in a JRXML


    Sarthak Chaudhary
    • Features: Reports Version: v8 Product: JasperReports® Server

    Problem Statement: 

    How can we limit the number of records being shown in a report? 

    Solution: 

    In JRXML-based reports, you first need to perform your own limiting via SQL clauses, like the LIMIT clause for Postgres or MySQL, and ROWNUM for oracle. After we get the record set, you can use the built-in report parameter REPORT_MAX_COUNT.  (https://community.jaspersoft.com/documentation/v8-v80-v800/tibco-jaspersoft-studio-user-guide; Chapter 6 Parameters; Default parameters: page96) This built-in parameter accepts java.lang.Integer values representing the number of records from the data source that the engine will process during the report filling. The Ultimate Guide also mentions a few properties that are governors which might interest you, they affect the timeout of report runs, and max pages to be filled.  These can be set in WEB-INFclassesjasperreports.properties.net.sf.jasperreports.governor.max.pages.enabled. (http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.governor.max.pages.enabled)


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...