Creating a Custom Report Template in iReport

Posted on October 24, 2018 by DEFTeam

iReport Template Designer is a tool to make Jasper reports. A lot of us use default templates for creating reports. We might have barely noticed that the custom report template is also available. In this blog, we will walk you through “Creating a Custom Report Template in iReport”.

An iReport template is a predefined style/layout that we can use to create reports. An iReport template can help report designers to maintain a standard format for reports with predefined styles and reduce the development time. The iReport template can also help in keeping consistency among report designs. These iReport templates can be reused to create a few standard reports, like invoice reports, work orders, and different statements (income, profit & loss, etc). By using iReport templates, we can have most of our report formatting complete even before we start developing the report. This saves a lot of time for a report author/developer. iReport gives users an option to choose from various ready-to-use templates. When a user selects to create a new report, a prompt with the predefined template is displayed. The user can either choose a new report or an existing template, as shown in the below screenshot.

DEFTeam Blog Image

We can add these custom templates to the repository as per our convenience. Please follow the following steps to add report template to the new file editor page.

Step 1:

Go to Tools → Options and select iReport → Wizard Templates

DEFTeam Blog Image
DEFTeam Blog Image

Step 2:

Now we can add a report template by clicking on the Add Jrxml button. A report template is just a simple jrxml report with predefined styles, fonts, and report bands.

DEFTeam Blog Image

Now we can choose any existing jrxml from our machine, which needs to be added to the report template repository.

Step 3:

Once the report is added to the Wizard Templates, we can see the template in the template chooser window while creating new reports, and creating a custom report template in iReport will be available for the report authors to use.