Saving Templates

Jaspersoft Studio templates require a flat folder structure (resources and report must be on the same folder), so when you export a template, the resources are moved and the paths in the report exported are changed to point to the same directory. Because in a flat structure one resource overwrites another, if there are resources in multiple folders with the same name, an error message is shown.

Creating a Template Directory

You can specify one ore more directories in which to place custom templates.

1. Go to Window > Preferences > Jaspersoft Studio > Templates Locations.

Template Location Preferences

2. Click the New... button and navigate to the directory in which you want to store your template.
3. Click the Apply button.
4. Click OK.

Exporting a Template

After you have created a template, save it for future use.

1. Go to File > Export as Report Template.

Template Export Dialog

The Template Export dialog opens.

2. Click the Browse button and navigate to the directory where you want to save your template. Click Next.

The Define Type and Categories dialog opens.

Define Type and Categories Dialog

3. In the drop-down, choose whether the template type is a Standard Report or a Table-Based report.

This selection is used to validate the report. For example. by selecting Standard Report, the validation process searches for the group field with the text group or for the column header label with the text label. If any of the required fields is not found, an error message is displayed.

4. Select the categories in which you want to make the template available, and using the arrow button, add them to the Selected Categories box.
5. Click Finish.

Creating a Template Thumbnail

Saving a thumbnail is not mandatory, but it is helpful, especially if your template are used by more than one person.

1. Go to the Preview tab.
2. Click the Export Image button.
3. Save the image in the same directory and with the same name as your template.
Version: 
Feedback
randomness