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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>iReport</strong> <strong>Ultimate</strong> <strong>Guide</strong>Figure 11-23 The master report with the two subreports for addresses and hobbiesIn the Detail band, position the id, lastname, and firstname fields. Underneath these fields, add the two Subreportelements, the first for the e-mail addresses, the second for the hobbies.The e-mail and hobby subreports are identical except for the name of the field in each one (see Figure 11-22). The two reportsshould be as large as the Subreport elements in the master report, so remove the margins and set the report width accordingly.Figure 11-24 The subreport layoutPreview both the subreports just to compile them and generate the relative .jasper files. You will get an error during the fillprocess, but it’s okay. We have not set an Xpath query, so UR is not able to get any data. You can resolve theproblem by setting a simple Xpath query (it will not be used in the final report), or you can preview the subreport using anempty data source (you will have to select it from the combo box in the tool bar).When the subreports are done, execute the master report. If everything is okay, you will see the print shown in Figure 11-25.It displays people grouped by home and work categories and the subreports associated with every person.194

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

Saved successfully!

Ooh no, something went wrong!