Column Menu

Reports that contain table components are enabled for user interactivity. Table components are defined in Jaspersoft Studio or from Ad Hoc Views. When a table is enabled for interactivity, column formatting, filtering, and sorting are managed from a menu displayed by clicking the column you want to apply changes to. These menu icons are described in “Export File Types”.

Column Formatting Icons





Formatting/Show column/Hide column

Select Formatting to open the Format Column box.

Select Show column or Hide column.


Column filters

Click to open the Filter column box.


Sort ascending

Click to sort fields in the selected column in ascending order.


Sort descending

Click to sort fields in the selected column in ascending order.


Column size

Click and drag this icon to make columns wider or narrower.

Data Snapshots

Some reports have an optional data snapshot feature enabled. A data snapshot is a cached copy of the data included in a specific report. Data snapshots allow you to access a report's data (including input control settings) without having to retrieve it from the data source, which in some cases can save a significant amount of time.

When a report is opened in the Report Viewer, data is retrieved from the data snapshot. If the snapshot does not exist, then a live query is made to the data source. A snapshot is created when a report is saved from the viewer, or via the scheduler. The Report Viewer UI displays a date and time stamp that indicates when the report data was last refreshed with live source data.

The system administrator can enable or disable the data snapshot feature.

It should be noted that a report can have only one snapshot. For instance, if you edit and save a report that already has a snapshot associated with it, a new snapshot overwrites the previously-created snapshot.

Report Viewer Responsiveness

A responsive report adapts its output to the current size of the screen. When you open a responsive report in the Report Viewer and resize the screen, the Report Viewer lets you view the rendered report based on the screen size. If the screen size is smaller, you can see a rendered report suited for the smaller screen and so on. The response of the Report Viewer to the different screen sizes makes it responsive.

In the main JRXML of the report unit (See Overview of a Report Unit for more information), the following property is used to communicate to the report viewer that the report is responsive.

For example:

<property name=“net.sf.jasperreports.htmlviewer.responsive.breakpoints” value=“1000, 1200"/>

In this example, the integer values separated by comma declares the screen size intervals. The report viewer reads this property when the report is run and re-triggers the report to run every time the screen size changes.

When you resize the screen, the report viewer re-runs the report with the new REPORT_CONTAINER_WIDTH value. REPORT_CONTAINER_WIDTH is a built-in parameter used to control the rendering of a certain part template.

For example: If you define three screen size intervals:

Smaller than 1000px
Between 1000px and 1200px
Greater than 1200px

Then, there will be three JRXML parts for each interval, and only the suited part appears for the current screen size, read from the built-in REPORT_CONTAINER_WIDTH parameter when the report is run.

If your report does not define screen size intervals, it is not considered responsive and the report viewer runs the report only once and will not be responsive when the screen is resized.