Jump to content
Changes to the Jaspersoft community edition download ×

  • morlandin
    • Features: Reports Version: v8.2 Product: Jaspersoft® Studio

    Overview

    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.

    Creation of a Template

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

    1(21).png.431b03e314f43333451cb2ad89c397b4.png

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

    2(19).png.5e946b26bc4445f0ccf403956185e625.png

    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".

    3(13).png.64019e50157c85cd3fec80248ab9a774.png

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

    Using of a template inside the report

    Open a report, right click on the Styles node into the Outline View and select "Create Style Template".

    4(14).png.c3c052c16124de83c0cb2ed1d2f40d3c.png

    Now a new dialog will be opened and from here you can select a style template created before. Select the style and hit Ok.

    5(11).png.9afd8637aeee5d798a656ec4f6d48892.png

    Now you can use the styles defined in the imported template in a similar way of the normal styles. Just select an element and from its properties use the one named "Style". Here you will find a combobox showing the available styles. But note that are shown only the internal ones, the external ones (which comes from a template) must be selected by typing directly their names.

    6(10).png.cf8cf3fc707f4e2e9f3e3b050815583f.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...