Administering Ad Hoc Views

While the previous sections focused on end-user tasks, the following sections provides information for administrators who maintain Ad Hoc Topics and Domains and configure JasperReports Server, including:

Administering Report Templates
Administering Topics
Administering Domains
Scalability

For information about OLAP client connections, which can also form the basis of Ad Hoc views, refer to the Jaspersoft OLAP User Guide and Jaspersoft OLAP Ultimate Guide.

Administering Report Templates

Report templates customize the look of the reports you create from Ad Hoc views. Report templates are located in the Public/Templates folder. To add a new template, create a report template in Jaspersoft Studio and publish it to the server. See the Jaspersoft Studio User Guide for more information on creating and publishing report templates.

Administering Topics

From a user perspective, Topics are data sources containing sets of fields that can be added to a view or report. Topics provide a starting point for end-users using the Ad Hoc Editor. Under the covers, Topics are JRXML files that have been uploaded to a specific location in the repository. The views in the /Ad Hoc Components/Topics folder populate the Topics tab that appears when users click Create > Ad Hoc View.

The JRXML file that the Topic is based on must contain a query and a field list. For details about creating JRXML files, refer to the JasperReports and Jaspersoft Studio documentation.

Any report layout in the Topic’s JRXML file is ignored by the Ad Hoc Editor. We recommend that a Topic’s JRXML file not include anything other that the query and field list.

Perhaps the simplest way to create Topics is to create new JRXML files using Jaspersoft Studio, then use Jaspersoft Studio to upload them to the repository. Note that Jaspersoft Studio cannot edit Ad Hoc views.

When you create a JRXML file that will be used as a Topic, you can specify the name to display for each column that the Topic returns. To do so, define a field property named adhoc.display for each field declared in the JRXML. For more information, see the JasperReports Server User Guide.

Administering Domains

From a user perspective, Domains are sets of fields that can be configured and filtered before being added to a view. Domains provide a starting point for end-users using the Ad Hoc Editor. Under the covers, Domains are defined by a design that can be uploaded to the server and exported as XML. Unlike Topics, which must be stored in a specific folder in the repository, Domains are detected regardless of their location in the repository. The /Domains folder is included for your convenience, but the Domains tab in the Source dialog (which appears when users click Create > Ad Hoc View) displays all the Domains to which you have access in the repository.

For details about creating Domains, refer to the JasperReports Server User Guide.

Scalability

When you open views in the Ad Hoc Editor, the query’s entire result set is retrieved. If your Topics, Domains, or OLAP client connections return large result sets, your server instance requires more memory. Similarly, many actions users take in the Ad Hoc Editor (such as adding groups) require the server to re-sort the data on the server; if the query returns a large result set, the user may notice a delay when making such changes.

To reduce delays, decrease the memory requirement, and support more users, we recommend that the queries in Topics, Domains, and OLAP client connections return a reasonable amount of data for your hardware and system capacity.

If you encounter scalability or performance issues around Ad Hoc views, examine the server’s memory usage first. Then consider optimizing your Topics and Domains.

A Domain very often returns a large volume of data, which can impact performance of the Domain designer, the Ad Hoc Editor, and the final views and reports. If your Domain’s performance is slow, try the following remedial steps:

Set your data policies and other Ad Hoc settings to reasonable values for your data and system configuration. In the case of data policies, you can configure the server to use less memory but perform more queries, which may perform better under certain circumstances. For more information, refer to the JasperReports Server Administrator Guide.
The Java Virtual Machine (JVM) that the server runs in may need to be configured for higher memory usage. For information, refer to the documentation associated with your JVM. For more information, refer to the JasperReports Server Installation Guide.
Use the smallest number of joins that creates the data islands you need. Complex join relationships can impact performance drastically.
If your end-users experience time out messages or views and reports that seem to never complete, consider changing the governors defined for views and reports. For more information, refer to the JasperReports Server Administrator Guide.
Use filters to narrow the data returned by Domains or Domain Topics to improve performance of views based on large or complex Domains: limit the initial load time of a Domain by defining a filter in the Choose Data wizard. Set it to prompt to allow your users to edit it or remove it in the Ad Hoc Editor’s filter pane.
When running a view that relies on a Domain, the server uses the filters and security defined for the particular view and user to limit the query. Running many views with slightly different security or filters may cause problems with the server’s memory usage. In this case, similar data is duplicated in memory, which can impact performance. Increasing the memory allocated to the application server that hosts JasperReports Server can mitigate this issue.

For more information about configuring Domains, refer to the JasperReports Server Administrator Guide.

Version: 
Feedback