Report Templates (jrxml) Editor


The Report Templates editor is where reports are built and run. You can build a report using a WYSIWYG editor or, for advanced users, a source editor for .jrxml file. In the Preview view, we can see our report filled with data from data source and save the results in different formats.

Design mode WYSIWYG editor.

This is the most used editor in Jaspersoft Studio. This editor is used together with Outline View , Properties View , Palette , and Problems View . Some complex JasperReports components like list, table, and crosstab have their own editors - to open these, just double click on the element in the designer or Outline view. There are buttons on the toolbar to control zoom, publish reports to a Jaspersoft Server, open query editor, or change settings related to rulers, grid, decorators. To add elements to the page drag and drop them from the Palette. It is also possible to drag and drop fields, properties or variables from the Outline view directly to the report. Use the context menu to delete, arrange, resize, align, set PDF properties of the elements. You can use keyboard to manipulate elements on the canvas: DEL to delete an element, arrows to select elements, . (point) will select an operation like resize left, right, up, down, or move.

Figure 1. Design mode

Design mode

Source mode.

This is a simple text editor with XML syntax highlighting. You can use it in combination with Outline view where all XML nodes are visible. Clicking on a node shows its position to the corresponding line in text editor.

Jrxml errors are shown in the left vertical band of the editor in front of the problematic line. Users can see all the errors in Problems view. Clicking on an error positions the cursor on the relevant error line in the editor.

Figure 2. Source mode

Source mode

Preview mode.

The goal of this view is to prompt user input parameters, help configure some settings, select a data adapter, see generated report in different formats, and save report to a file. There are three main parts to the view:

  • A toolbar with buttons to select data adapter, run report button and a menu to select the preview mode like java, html, csv, etc.

  • On the right we have a preview for each format, for html this will be an embedded browser, for Java we'll have some additional controls like page navigation, zoom.

  • The right part, contains several pages: input controls, built-in controls, sort fields, exporter preferences.

Figure 3. Preview mode

Preview mode