Jump to content
We've recently updated our Privacy Statement, available here ×
  • Controlling the default format of components in Studio


    Scott Andersen
    • Features: Reports Product: Jaspersoft® Studio

    You can change the default format of components by using element template sets. A template set is a specialized jrxml file that contains default settings for specific elements.

    Creating a template set

    There are a couple of ways to create a template set.

    From scratch.

    Go to the “Settings” drop down, select “Elements Templates”, and “Create new Template Set”.  This starts the template set wizard to create the template set.

    template_set_create_1.png.84a9cb88a15e2f7eeae93f46bc788f23.png

    From an existing component.

    Right click on the component and select “Add to Template Set”.

    template_set_create_2-a.png.ad0387895dd837b532588337b1f21414.png

    If a template set is currently selected the selected component is added to the template set. If no template set is currently selected, you are presented with the option to create a new template set. 

    template_set_create_2-b.png.0a36606ef00ca111c0fa9b65360b708c.png

    The template set wizard is displayed.

    template_set_create_2-c.png.eed64edc43a52897066cb09e97a7e77d.png

    To create a template set all you need is a location in your project to store is and a name

    Editing a template set

    The template set is displayed in the designer just like a normal report design. In addition to adding elements to a template set from an existing component on a report as described above, you can add components directly to the template set, just as you would add a component to a report design.

    template_set_create_2-d.png.1f78cd1f1d3db6b7f1d0058272749eab.png

    Using a template set.

    You can point your Studio environment to a template set by selecting “Settings” drop down, “Element Templates”, select the template set you wish to use, and select “Use Template Set”. (Indicated by the red circles in the image below.) To reset to the default element formats click on the “Settings” drop down, “Element Templates”, and “Don’t use a template set”.

    template_set_use.png.0683d0d980e2b5bfb080a3f58c7ca119.png

    When a template set is active the element definitions defined in the template set will be used whenever you add a corresponding element to a report.  For example, dragging a “Field” into your report will generate a “Text” element with the format of the last text element in your active template set.

    template_set_create_2-d.png.3bc650850b6ad368daec98627b73e978.png


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...