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>Code Example 11-5Complex XML exampleDavolioNancydavolio1@sf.netdavolio2@sf.netMusicSportFullerAndrewaf@test.netafullera@fuller.orgCinemaSportLeverlingleverling@xyz.itPeacockMargaretmargaret@foo.orgFoodBooksWhat we want to produce is a document that is more elaborate than those you have seen until now—for each person, we wantto present their e-mail addresses, hobbies, and favorite people.To obtain such a document, it is necessary to use subreports; in particular, you will need a subreport for the e-mail addresseslist, one for hobbies, and one for favorite people (that is a set of nodes out of the scope of the XPath query we used). Togenerate these subreports, you need to understand how to produce new data sources to feed them. In this case, you use theJRXmlDataSource, which exposes two extremely useful methods:192

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

Saved successfully!

Ooh no, something went wrong!