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.

SubdatasetsUR permits you to use a scriptlet to perform special calculations on the records of a subdataset in a manner similarto that provided for the main report. You can set the name of your scriptlet class when you create your new subdataset. Youcan also set the name of the resource bundle to be used with the dataset and set the appropriate policy to apply in case of amissing key.<strong>iReport</strong> allows you to edit the query, ordering and filter options for the subdataset from the query dialog. To open it, select thesubdataset node in the outline view and click Edit query (see Figure 15-4).Figure 15-4Subdataset Context menu - Edit QueryThe fields, variables, parameters, and groups for a subdataset can be managed directly from the outline view (Figure 15-5).Figure 15-5Subdataset content treeThe query dialog can be used to automatically register fields in the subdataset in the same way as the main report (that is,getting the fields from an SQL query).In the context of a dataset, groups are only used to group records and there is no discrete portion of the report tied to them (forexample, like the header and footer bands associated with groups). Primarily, dataset groups are used in conjunction withvariable calculations.15.2 Creating Dataset RunsAs mentioned previously, you can use a subdataset in a chart, crosstab, and list. To provide data to the subdataset, URneeds some extra information, such as which JDBC connection to access for the subdataset SQL query, or howto set the value of a specific subdataset parameter. All this information is provided using a dataset run.301

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

Saved successfully!

Ooh no, something went wrong!