Difference between revisions of "Create a Basic iReport Template"
Line 21: | Line 21: | ||
</ol> | </ol> | ||
− | [[Image: | + | [[Image:iReportWizard1.png|center|500px|''Figure 1. iReport Wizard – Step 1'']] |
− | |||
<div align="center"> | <div align="center"> | ||
''Figure 1. iReport Wizard – Step 1'' | ''Figure 1. iReport Wizard – Step 1'' |
Revision as of 18:44, 16 September 2013
How To |
---|
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:
- From the File menu, select New....
- The iReport Wizard window displays.
- 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
Figure 1. iReport Wizard – Step 1
- Click the Next button.
- The window to select the attributes to include in the report displays.
Figure 2. iReport Wizard - Step 2
- From the Step 2. select fields screen:
- Select the attributes that you would like to include in the report. Error! Reference source not found. describes the available buttons.
- Click the Next button.
- A window displays the selected fields.
- Click the Next button.
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.
- 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.
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. |
- Click the Next button.
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
- From the window to select a layout:
- Select the layout option.
- Click the Next button.
- The window displays a message stating that you have successfully created a new report.
- Click the Finish button.
- The template for your report displays.
- Ensure that the data source selected matches the item of the report.
Figure 6. Report data source
- Click the File:IRepCompile.png button to compile the report.
- The Save report window displays.
- Enter a name for the report in the File name field.
- If there are no compilation errors, click the File:IRepRun.png button to run the report.
- 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
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