SubReports vs. Bands/Groups ?

Hi,

I've got a 2 page report happening which works great. It has XML data source, and displays a ton of fields all over the 2 pages.

We now want to extend the report to iterate over 2 branches in the XML. For simplicity, our XML looks sort of like:

<root>
<maindata>
<a>
<name>BarneyRubble</name>
</a>

<b>
<item><date>12 Jul 2006</date></item>
<item><date>13 Jul 2006</date></item>
</b>

<c>
<item><date>14 Jul 2006</date></item>
<item><date>15 Jul 2006</date></item>
</c>

</maindata>
</root>


We are currently rendering a number of elements from A across 2 pages (title band & summary band).

I now want to keep those 2 pages in place, but after page 2 I want to iterate over all the items in A and then all the items in B

My question is, should I try and make a subreport ? or can I move page 2 and use the detail band somehow and group all the item A's together and all the B items together ?
I know this is perhaps more of a JasperReports question than JasperAssistant one, but as we are using JasperAssistant, I would like to know which would be easier to implement & support.

Thanks.
Exie,

Without using subreport you are only able to iterate one list of data items (using the detail band). If you have several list or nested lists you must use subreports.


I hope this helps,

Peter Severin
- JasperAssistant Team
Thanks!

This is a bit a cow, as I actually have 3 levels in my XML datasource that need iterating over (List's of beans within beans).

I've got the Subreports going in JasperAssistant, and although I edit them as 2 separate files, they do come out when I preview the master (Hooray!).

Thanks again for the tip.
This topic is archived Other recent topics