Changes

Create iReport Templates with Subreports

326 bytes added, 19:46, 18 September 2013
Step 3 – Add Parameter to Subreport
====Step 3 – Add Parameter to Subreport====
<p>To connect a subreport to the Main report, we next need to create a parameter for passing the identification (guid) of the primary IMSMA Item between the subreport and the main report. Below is In the '''Report Inspector''' on the instructions subreport, [[Modify an iReport Template#Adding a Parameter to create an iReport Template|add a Parameter]] to hold the guid of the IMSMA Item on the main report. It is recommended to add a fairly generic parameter you need for name such as ''ItemGUID'' so that the subsubreport can be more easily re-report:</p>used.
# In From the Report Inspector, '''Report Inspectorright click''' on the subreport, '''Parameter''' tree and choose '''Add Parameter'''.#: [[Modify an iReport Template#Adding a Parameter to an iReport TemplateImage:IReport AddParameter1.png|center|250px|add a ''Add Parameter'']] to hold # In the guid of the IMSMA Item on the main report'''Properties''' pane, enter a parameter name (e.g. ItemGUID} and edit any other properties. It Normally it is recommended not required to add a fairly generic parameter edit anything other than the name such as .#: [[Image:IReport AddParameter2.png|center|250px|''ItemGUIDAdd Parameter'' so that the subreport can be more easily re-used.]]
# Once the parameter is added it will be available in the '''Report Inspector''' and can be referenced as ''$P{parametername}''. For example:
$P{ItemGUID}
319
edits