I’m using iReport and I need to create a sub-report using a XML DataSource.
I will have only one XML for the hole report. Something like this:
<question> <text>What do you think about SO?</text> <options> <option>Like it</option> <option>Really like it</option> <option>Love it</option> </options> </question>
The main report will have it’s detail linked to the questions, each question will have many options. Each sub-report must be linked to the options for the question… Well master-detail.
All that I could find with some googling was using SQL, I want to use XPath.
Take a look at the JRXmlDataSource JavaDoc. There are example that show how it’s done.