Difference between revisions of "Modify an iReport Template"
From IMSMA Wiki
(Created page with " ====Adding a Group to an Existing Report====__NOEDITSECTION__ {{note|The field on which you would like to group your report results must be included in the report.}} To add...") |
|||
Line 1: | Line 1: | ||
+ | __FORCETOC__ | ||
+ | {{TOC right}} | ||
+ | {{HowTo's | ||
+ | |[[Start and Configure i-Report|Start and Configure i-Report]] | ||
+ | |[[Create a Basic i-Report Template|Create a Basic i-Report Template]] | ||
+ | |[[Modify an iReport Template|Modify an iReport Template]] | ||
+ | |[[Format an iReport Template|Format an iReport Template]] | ||
+ | |[[Create i-Report Templates with Subreports|Create i-Report Templates with Subreports]] | ||
+ | |[[Summarize i-Report Template Data|Summarize i-Report Template Data]] | ||
+ | }} | ||
====Adding a Group to an Existing Report====__NOEDITSECTION__ | ====Adding a Group to an Existing Report====__NOEDITSECTION__ |
Revision as of 17:39, 16 September 2013
How To |
---|
Adding a Group to an Existing Report
The field on which you would like to group your report results must be included in the report. |
To add a group to an existing report:
- From the View menu, select Report Groups.
- A window displays the groups for the report.
- Click the New button.
- The Add/modify group window displays.
- 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.
- Click the File:IRepExpress.png icon.
- The Expression editor window displays.
- Ensure that the Objects and expressions tab is selected.
- Click Fields.
- Double-click the name of the field on which you would like to add a grouping.
- The Expression editor window shows $F{FieldName} where FieldName is the name of the field that you selected previously.
- Click the Apply button.
- The Add/modify group window displays the expression in the Group Expression field.
- Click the OK button.
- The Add/modify group window closes.
You may also enter the expression in the Group Expression field if you know the exact spelling of the field name on which you would like to group the results. The syntax is $F{FieldName}. |
Adding Fields
If you need to include a field that was not selected while using the Report Wizard, you will need to know the name of the field that is used by the data source. Find a list of available field names by using the Report Wizard.
To add a field to your report:
- From the View menu, select the Fields option.
- A window displays three tabs (Fields, Variables, and Parameters).
- From the Fields tab, click the New button.
- The Add/modify field window displays.
- In the Field Name field, enter the name of the field that you would like to include.
- Click the OK button.
- The field is included on the Fields tab.
- Close the window that displays the Fields, Variables, and Parameters tabs.
- Reposition the fields on your report as needed to accommodate the new field.
- Click the File:IRepF.png icon.
- Click the detail section of the report.
- While holding down the mouse button, drag the cursor to form the rectangle which will contain the new field.
- Release the mouse button.
- A placeholder for the field is displayed in the design section of the report.
- Double-click the placeholder that was added for the field.
- Change the placeholder text so that the field that you added is between the brackets.
Sorting Report Results
It may be helpful to sort the report results using the value in one or more of the fields. Sorting the results makes it easier to review the results and locate any records that you may be searching for. To sort report results:
- Create the report.
- From the Data menu, select the Report Query option.
- The Report query window displays.
- Click the Sort options button that is located at the bottom of the Report query window.
- The Sorting Options window displays.
- Click the Add Field button.
- The Sort Field window displays. The Sort by list displays all the fields that you have selected for the report.
- From the Sort by list, select the field by which you would like to sort the report results.
When sorting data in reports that contain groups, ensure the “Group by” fields appear first in the sort order. |
- From the Sort Type list, select either the Ascending or Descending sort order.
- Click the OK button.
- The selected field displays in the Sorting Options window.
- Repeat steps 4-7 for each field on which you would like to sort the results.
- After you have completed adding the fields on which you would like to sort the results, click the Close button.
- The Sorting Options window closes.
- From the Report query window, click the OK button.
- The Report query window closes.
You will need to compile and execute the report for the sort options to take effect.