Creation of a Styles Template


Instead of repeatedly defining similar styles for each report, you can define a style in the styles library and reuse it in other reports. To achieve this you can use a style template (called also Styles Library in iReport), which is a container where one or more styles are stored. In this container there must be only styles.

From JasperSoft Studio open the menu File->New->Style Template File

Figure 1. Select the action to create a new styles template

Select the action to create a new styles template

Now select the folder in your workspace where to put the template file and the name of the file. Then hit Finish.

Figure 2. Select name and location

Select name and location

Now a new style template will be created, with already a style in it. At this point you can create new styles by right clicking on the Styles node, into the Outline view, and select "Create Style".

Figure 3. Add another styles to the template

Add another styles to the template

To edit a style simply select it and edit its properties from the property tab, like you do in a normal report.