Jump to: navigation, search

Modify an iReport Template

422 bytes removed, 17:46, 17 September 2013
no edit summary
<p>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.</p><p>To illustrate, suppose you wanted to create a report to list all land within each location ID. An ungrouped report 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.</p>
[[Image:iRep07.png|center|500px|''Figure 7. Land report with no grouping'']]
<p>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 the figure below 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.</p>
[[Image:iRep08.png|center|500px|'' Land grouped by location'']]
To add a group to an existing report:
<li>From the '''View''' menu, select '''Report Groups'''.</li>
<li>A window displays the groups for the report.</li>
<li>Click the '''New''' button.</li>
:The Add/modify group window displays.
<li>Enter an identifier for the group. This should be a meaningful name that allows you to easily identify the contents of the group such as the field on which the results are grouped.</li>
<li>Click the [[Image:iRepExpress.png]] icon.</li>
:The Expression editor window displays.
<li>Ensure that the Objects and expressions tab is selected.</li>
<li>Click '''Fields'''.</li>
<li>Double-click the name of the field on which you would like to add a grouping.</li>
:The Expression editor window shows $F{FieldName} where FieldName is the name of the field that you selected previously.
<li>Click the '''Apply''' button.</li>
:The Add/modify group window displays the expression in the Group Expression field.
<li>Click the '''OK''' button.</li>
:The Add/modify group window closes.
{{note|You may also enter #From the '''Report Inspector''', right-click on the top node of the expression in Report.#Select '''Add Report Group''' from the menu#: [[Image:IReport Report Group1.png|center|200px|''Add a Report Group'']]<div align="center">''Add a Report Group''</div>#Select a name for your Report Group Expression and choose a field if to group by (e.g. maAreaType to group by land classification). The name should be a meaningful name that allows you know to easily identify the exact spelling contents of the group such as the field name on which you would like to group the resultsare grouped#: [[Image:IReport Report Group2. The syntax is $F{png|center|500px|''Create a Report Group'']]<div align="center">''Create a Report Group''</div># Choose '''Next''' and '''Finish'FieldName''}.}} This will create a new group in the iReport template as well as two additional bands (a header and a footer for the group).
===Sorting Report Results===
<ol start="13">
<li>Create the report.</li>
<li>From the '''Data''' menu, select Select the '''Report Query''' optionbutton.</li>
:The Report query window displays.
<li>Click the '''Sort options''' button that is located at the bottom of the Report query window.</li>

Navigation menu