Difference between revisions of "Create a Basic iReport Template"

From IMSMA Wiki
Jump to: navigation, search
Line 75: Line 75:
 
<ol type="a" start="2">
 
<ol type="a" start="2">
 
<li>Click the '''Next''':
 
<li>Click the '''Next''':
The window to group the report data displays. The [[Modify an iReport Template#Grouping and Sorting|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.
+
The window to group the report data displays. The [[Modify an iReport Template#Sorting_and_Grouping|group by]] step allows you to list item records that have the same value for the selected group by field together in the report.  
</ol>
 
 
 
[[Image:iRep03.png|center|500px|''Figure 3. Group by example'']]
 
  
 
<ol start="6">
 
<ol start="6">
Line 84: Line 81:
 
</ol>
 
</ol>
  
{{note|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.}}
+
{{note|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 [[Modify an iReport Template#Sorting_and_Grouping|sorting]].}}
  
 
<ol start="7">
 
<ol start="7">
<li>Click the '''Next''' button.</li>
+
<li>Click the '''Next''' button and then '''Finish'''</li>
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.
+
The Wizard is complete and the iReport template designer window is open. Depending on your selections your template will look different from the example below.
</ol>
+
[[Image:iReportHome1.png|center|500px|''Figure 2. iReport Wizard - Final Step'']]
 
 
[[Image:iRep04.png|center|500px|''Figure 4. Columnar layout'']]
 
<div align="center">
 
''Figure 4. Columnar layout''
 
</div>
 
 
 
<p>The tabular layout option displays the field names across the top of the page. The corresponding report results are displayed below each field name.</p>
 
 
 
[[Image:iRep05.png|center|500px|''Figure 5. Tabular layout'']]
 
 
<div align="center">
 
<div align="center">
''Figure 5. Tabular layout''
+
''Figure 3. iReport Wizard - Final Step''
</div>
 
 
 
<ol start="7">
 
<li>From the window to select a layout:</li>
 
<ol type="a">
 
<li>Select the layout option.</li>
 
<li>Click the '''Next''' button.</li>
 
:The window displays a message stating that you have successfully created a new report.
 
</ol>
 
<li>Click the '''Finish''' button.</li>
 
:The template for your report displays.
 
<li>Ensure that the data source selected matches the item of the report.</li>
 
</ol>
 
 
 
[[Image:iRep06.png|center|500px|''Figure 6. Report data source'']]
 
<div align="center">
 
''Figure 6. Report data source''
 
</div>
 
 
 
<ol start="11">
 
<li>Click the [[Image:iRepCompile.png]] button to compile the report.</li>
 
:The Save report window displays.
 
<li>Enter a name for the report in the File name field.</li>
 
<li>If there are no compilation errors, click the [[Image:iRepRun.png]] button to run the report.</li>
 
:The results of the report display in the iReport JasperViewer window.
 
</ol>
 
  
 
===Grouping===__NOEDITSECTION__
 
===Grouping===__NOEDITSECTION__

Revision as of 20:00, 16 September 2013

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
Figure 1. iReport Wizard – Step 1

Figure 1. iReport Wizard – Step 1

  1. Click the Launch Report Wizard button.
  2. The window to name the report and file location displays.
Figure 2. iReport Wizard - Step 2

Figure 2. iReport Wizard - Step 2

  1. Select the desired Data Source for the report and choose Next
Figure 2. iReport Wizard - Step 3

Figure 3. iReport Wizard - Step 3

  1. Select the desired data fields for the report and choose Next
Figure 2. iReport Wizard - Step 4

Figure 3. iReport Wizard - Step 4


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 all fields from the report.
Note.jpg It is recommended to always include the guid field when designing a report
    1. Click the Next: 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.
      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 and then Finish
      2. The Wizard is complete and the iReport template designer window is open. Depending on your selections your template will look different from the example below.

        Figure 2. iReport Wizard - Final Step

        Figure 3. iReport Wizard - Final Step

        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