Changes

Jump to: navigation, search

Create iReport Templates with Subreports

232 bytes added, 14:08, 8 April 2014
no edit summary
# Save the subreport.
====Step 5 – Add Link the Subreport Parameter to the Main Report====__NOEDITSECTION__We created a parameter on Now that both the main and the subreport to connect to are ready, the main report in Step 3, now we need only thing that remains to create a parameter on be done is linking the main report as welltwo together. Below is are the instructions to create link the parameter you need for the main reporttwo reports:# Make sure you are at the Main main report by selecting the name of the main report from the tabs at the top of the iReport Designer canvas pane.
# Select the subreport box within the 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.
#: [[Image:IReport_SubReportProperties.png|center|200px|''Subreport properties'']]<div align="center">''Subreport properties''</div>
# '''Add''' a parameter and give it a type '''exactly the name of the subreport parameter created in step 3''' (e.g. ''ItemGUID'')
#: [[Image:IReport_SubReportParameter.png|center|200px|''Add a parameter'']]<div align="center">''Add a parameter''</div>
# For the '''value expression''', select the appropriate field to include in the parameter. '''Normally this is ''$F{guid}''''' but other choices are available.
#: [[Image:IReport_SubReportParameter2.png|center|200px|''Select the appropriate field'']]<div align="center">''Select the field to include in the parameter''</div>
# Click '''OK''' and close Subreport Parameters window.
 
You are now ready to run your main report. Running (i.e. previewing) the main report will automatically run the subreport(s) as well, and the data from the main as well as from the subreport(s) will be included in the output.
==Kinds of Subreports==__NOEDITSECTION__
1,068
edits

Navigation menu