Create a Basic iReport Template

Revision as of 18:44, 16 September 2013 by Noah (talk | contribs)

Creating a Basic Report Using the Wizard

IMSMANG provides an iReport Wizard to help in the process of creating new iReport templates.

To create a report:

  1. From the File menu, select New....
  2. The iReport Wizard window displays.
  3. From the Report Templates list, select the template you would like to use for your report. Blank A4 or an IMSMA specific template are preferrable

Caption1

Figure 1. iReport Wizard – Step 1

  1. Click the Next button.
  2. The window to select the attributes to include in the report displays.

Figure 2. iReport Wizard - Step 2

  1. From the Step 2. select fields screen:
    1. Select the attributes that you would like to include in the report. Error! Reference source not found. describes the available buttons.
Table 2. iReport Wizard – Buttons for selecting fields
Button Description
IRepRA.png Includes the selected field in the report.
IRepDRA.png Includes data for all fields in the report.
IRepLA.png Removes the selected field from the report.
IRepDLA.png Indicates a tip for using IMSMA.
Note.jpg If you would like to organise the report results by country structure areas, you should include the country structure level by which you would like to group the results as one of the fields. Be aware that including the country structure level field in the report will return a string that contains all country structure levels above the selected level.
    1. Click the Next button.
    2. A window displays the selected fields.
  1. Click the Next button.
  2. The window to group the report data displays. The group by step allows you to list item records that have the same value for the selected group by field together in the report. The below figure illustrates an example of a report that groups its results by gazetteer. For more information on grouping, refer to Grouping.

  1. If you would like to group the report data, select the attribute on which you would like to group the data from the Group list.
Note.jpg If you choose to group the report data, you may also want to sort the data using the attribute. For more information on sorting, refer to Sorting.
  1. Click the Next button.
  2. The window to select a layout displays. The iReport wizard provides two layout options. The Columnar layout option displays the field names in one column and their corresponding report result in another column.

Figure 4. Columnar layout

The tabular layout option displays the field names across the top of the page. The corresponding report results are displayed below each field name.

Figure 5. Tabular layout

  1. From the window to select a layout:
    1. Select the layout option.
    2. Click the Next button.
    3. The window displays a message stating that you have successfully created a new report.
  2. Click the Finish button.
  3. The template for your report displays.
  4. Ensure that the data source selected matches the item of the report.

Figure 6. Report data source

  1. Click the File:IRepCompile.png button to compile the report.
  2. The Save report window displays.
  3. Enter a name for the report in the File name field.
  4. If there are no compilation errors, click the File:IRepRun.png button to run the report.
  5. The results of the report display in the iReport JasperViewer window.

Grouping

Grouping allows you to organise the report results using the values of a particular field. Grouping results makes it easier to identify the records which share a common value. Rather than having to visually scan the report results to determine which records have a common value, grouping automatically organises the results for you.

To illustrate, suppose you wanted to create a report to list all land within each location ID. The procedures that have been discussed so far in this training module would simply list all land along with their location ID. Although the location ID is included in the report, it would be difficult, tedious, and time-consuming to scan the entire report to identify those land that have a common location ID.

Figure 7. Land report with no grouping

Figure 7. Land report with no grouping

Grouping report results automatically organises the records using the values on the specified field. Using the example above, the land in the report shown in Figure 8 are organised within the location to which they are associated. Records that do not contain a value for the selected grouping are put into their own group.

 Land grouped by location

Land grouped by location

Modify an iReport Template

Template:NavBox HowTo use iReport