Nested Tables from XML Datasource


I'm quite new to Jasper and I'm facing a blocking problem.

I have an XML source like this:

   <activity number="1">First activity</activity>
   <activity number="2">Second activity</activity>
   <activity number="3">Third activity</activity>
   <duration number="1">1 hour</duration>
   <duration number="2">1 day</duration>
   <duration number="3">2 days</duration>
   <description number="1">something short</description>
   <description number="2"></description>
   <description number="3">something long</description>
  <activity number="1">Second activity</activity>
  <activity number="2">Another activity</activity>
  <duration number="1">2 days</duration>
  <duration number="2">2 hours</duration> 
  <description number="1"/>
  <description number="2"/>
<item>.....</item> </items>

I need to produce a table grouped like this

Name Activity Name Duration Description
John First activity 1 hour something short
Second activity 1 day
Third activity 2 days something long
Paul Second activity 2 days
Another activity 2 hours

but I cannot find a way to group activity details (activity name, duration, description) to act like rows.

Is there a way to handle this completely inside a single jrxml file without changing XML source structure?

Please help,


m.rosetti's picture
Joined: May 15 2014 - 3:08am
Last seen: 6 years 9 months ago

0 Answers:

No answers yet