13.07.2015 Views

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Subreports10.4 Using the Subreport WizardTo simplify inserting a subreport, a wizard for creating subreports starts automatically when a Subreport element is added to areport.Figure 10-19 The Subreport WizardYou can use the Subreport Wizard, shown in Figure 10-19, to create a brand new report that will be referenced as a subreportor to refer to an existing report. In the latter case, if the report you choose contains one or more parameters, the wizardprovides an easy way to define values for them.10.4.1 Create a New Report via the Subreport WizardIf you are adding a subreport to the current report, the Subreport Wizard can create the report that will be used as the subreport.The steps to create the new report are very similar to those you follow in the Report Wizard:1. Select a connection or data source. If the data source requires a query (such as a JDBC or Hibernate connection), you canwrite it in the text area or load it from a file.2. Select fields.3. Define grouping.4. Select the layout.5. Define the subreport expression.6. Define the connection expression.The subreport expression is used to refer to the subreport’s Jasper file. The wizard lets you do this in either of two ways:• Store the path part of the subreport URL in a parameter, as shown in Figure 10-20, to make it modifiable at run time bysetting a different value for the parameter (the subreport path is the default value); or• Save the complete path in the expression.165

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!