Jump to content
Changes to the Jaspersoft community edition download ×
  • How to create a TIBCO JasperReports® Server template


    akonkin
    • Features: Reports Version: v6.2 Product: JasperReports® Server

    Problem:

    I want to create TIBCO JasperReports® Server template the changes in which should be reflected in AdHoc Views.

    Below are the steps that I did to do this:

    • Create a blank template.
    • Add an image, static text and rectangle to header.
    • Export report as template.
    • Create template using the export.
    • Upload template to JasperReports Server v6.2.
    • Try to create a report with template from any ad hoc query.

    The report with this template did not work and returned errors.


    Explanation and correct solution:

    • To create (or update) AdHoc View template in TIBCO JasperSoft® Studio you should use the approach that is described below (in the step-by-step description below I will update one of existing templates a4-landscape):
    • Run JasperSoft Studio
    • Connect to JasperReports Server Repository
    • Navigate to the templates folder and open in Jaspersoft Studio a4-landscape template
    • Add Title band to the report
    • Add Text Field to the report, define some properties for the text field (let's say backcolor)
    • Upload to the templates folder (for clarity of this example image leaf_banner_red.png)
    • Add Image component to the Title band and set its expression to the destination path of the image above ("/public/templates/leaf_banner_red.png")
    • Save and allow to update template in JasperReports Server
    • Create AdHoc Report from any AdHoc View and select the modified template from the list of available templates
    • Run the report that is based on modified template and check that everything works fine

    Please refer to the screenshot below that shows AdHoc Report that is based on the updated JasperReports Server template:

    2016-01-13_1739.png.5da07675e44894c01db996651d71baa3.png

    In short:

    To update JasperReports Server template you should not use approach that is dedicated to creating JasperSoft Studio template.

    You can find this information in JasperSoft Studio Guide 6.1, Chapter 5.3.1, page 86:

    "5.3.1 Creating a Report Template based on a Template in the Server It's easiest to start with a template in JasperReports Server and change its properties (such as colors, fonts, and logos) in Jaspersoft Studio. Then, publish the new template to the server. "

    I have attached to the article the aforementioned document and a sample of modified template.

     

    2016-01-13_1739.png.53bd3dfd682cfe8691a81a9c5e693b62.png

    jaspersoft-studio-user-guide_61.pdf

    a4_landscape.620.jrxml


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...