Viewing: Working with the Ad Hoc Editor > Limits on Queries

Configuring System-Level Ad Hoc Options

System administrators (users with ROLE_SUPERUSER) can control how the server handles the data for Ad Hoc reports.

Limits on Queries

There is a limit on the number of rows that a report can contain when run from the Ad Hoc Editor. There is also a limit on the length of time that a report can take to complete. The limits are defined in configuration parameters set by the system administrator.

   Row Limit. When the Ad Hoc Editor starts, it sends a query to the current data source to fetch data. The server limits the number of rows that it fetches:

    If the row limit is reached when starting the Ad Hoc Editor, the editor starts but it displays a warning message about the number of rows being returned. If a filter is in effect, you might be able to reduce the number of rows by changing the filter values.

    If the limit is reached when running an Ad Hoc report, the report stops and a message about the row limit appears. You can redefine the report so that it fetches fewer rows.

   Time Limit. An Ad Hoc report with complicated queries runs may take a long time to start returning data. If a query reaches the time limit before returning data, the query and the report are cancelled. To redefine the report so that the query completes more quickly, change the time limit.

In all cases, you can also ask the system administrator to raise the limits. For details, see the JasperReports Server Administrator Guide.

Data Policies

Data policies control whether certain processing occurs in the server or in the application storing the data source. These settings apply to reports created or re-saved in the Ad Hoc Editor (that is, changing the settings does not retroactively affect existing reports). By default, the server relies on the database to group, sort, and aggregate data returned by queries based on Domains when this is feasible. It also limits the data it retrieves to the fields that appear in the report. For JDBC and JNDI data sources accessed directly, not through a Domain, and for non-JDBC data sources, the server processes the data in memory by default.

A system administrator can configure the server to handle Domain-based and JDBC-based Ad Hoc reports differently:

   For Domain-based reports, the server can be configured to process the data in memory instead of the database. Consider factors such as the number of users and report complexity when deciding how the server should process data for Ad Hoc reports based on Domains data sources.

   For reports based on JDBC or JNDI data sources, the server can be configured to push the processing down to the database, as is done by default for Ad Hoc reports based on Domains.

These data policies are controlled on the Ad Hoc Options page. For more information, refer to the JasperReports Server Administrator Guide and to Configuring System-Level Ad Hoc Options.