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

  • eongaro
    • Version: v4.7

    In Ad-Hoc editor mode, there's a button for Sample Data and one for Full Data. Traditionally these would only limit the amount of data loaded into the server's memory, however the full query would always be executed against the database. Starting in Version 4.7 of JasperReports Server there are options, to issue LIMIT BY, ROWNUM or TOP queries against the database when using Domains.   In Version 5.0 this behavior is supported for more database vendors and the limiting behavior is enabled by default.

    The configuration file controlling this behavior is tomcat/webapps/jasperserver-pro/applicationContext-semanticLayer.xml.   In Version 5.0 and above, to peruse the keywords and positions of the limiting clauses, first find your database vendor's sqlGenerator 'ref' within serverTypes of the dbServerTypeConfigFactory bean.  Second, within your specific sqlGenerator bean, like oracleSQLGenerator, inspect the limitSQLMap property.

    In 4.7.0, to add this behavior for Postgres and MS Sql Server only, you will need to edit tomcat/webapps/jasperserver-pro/applicationContext-semanticLayer.xml - make sure to restart Tomcat after this change.  Using the pre-existing mysqlSQLGenerator bean as your example, find the bean specific to your database, like postgreSQLGenerator and modify the entries corresponding to the limitPosition and limitKeyword in the table below. 

    IMPORTANT NOTE: This feature is still considered experimental in 4.7.0, make sure to test your database before rolling this into production

    MySQL

    Bean ID mysqlSQLGenerator
    limitPosition AT_END
    limitKeyword limit

    Postgres

    Bean ID postgreSQLGenerator
    limitPosition AT_END
    limitKeyword limit

    Microsoft SQL Server

    Bean ID sqlserverGenerator
    limitPosition BEFORE_FIELD_LIST
    limitKeyword top

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...