Changes

Jump to: navigation, search

Create iReport Templates with Subreports

No change in size, 13:44, 8 April 2014
no edit summary
====Step 3 – Add Parameter to Subreport====__NOEDITSECTION__
To connect a subreport to the Main main report, we next need to create a parameter for passing the identification (guid) of the primary IMSMA Item item between the subreport and the main report. In the '''Report Inspector''' on the subreport, [[Modify an iReport Template#Adding a Parameter to an iReport Template|add a Parameter]] to hold the guid of the IMSMA Item item on the main report. It is recommended to add a fairly generic parameter name such as ''ItemGUID'' so that the subreport can be more easily re-used.
# From the Report Inspector, '''right click''' on the '''Parameter''' tree and choose '''Add Parameter'''.
====Step 4 – Define Report Query for Subreport====__NOEDITSECTION__
The next step is to create a report query for the subreport you just created in Step 3 to define how the IMSMA item on the Main main report is related to the IMSMA item on the subreport. Typically the subreport Report Query will receive the guid from the main report via the parameter created in Step 4 and then use it to limit items in the subreport to those linked to the main report. Below is the instructions on how to define the Report Query:
# Open the [[Modify an iReport Template#Using Report Query filters|Report Query window]].
====Step 5 – Add Subreport Parameter to Main Report====__NOEDITSECTION__
We created a parameter on the subreport to connect to the Main main report in Step 3, now we need to create a parameter on the Main main report as well. Below is the instructions to create the parameter you need for the Main report:# Make sure you are at the Main report by selecting the name of the Main main report from the tabs at the top of the iReport Designer canvas pane.# Select the subreport box within the Main main report.
#: [[Image:IReportSubReportSelection.png|center|500px|''Select the Subreport on the main report'']]<div align="center">''Select the Subreport on the main report''</div>
# On the '''Properties''' pane for the Subreport, select the '''Parameter''' selector.
1,068
edits

Navigation menu