[#4574] - XML subreports with more than one field works wrong

Category:
Bug report
Priority:
Urgent
Status:
Assigned
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

Ireport 3.7.0
A XML report (XML datasource) by example an invoice like:

<invoices>
<oneInvoice>
<Ïnumber>"12345"</Inumber>
<date>"01/02/2010"</date>
<customerID>"00045"</customerID>
<name>"aaaaaaaaaaa"</name>
<detail>
<line>
<article>"456-098"</article>
<description>"computer"</description>
<price>"100.00"</price>
</line>
<line>
<article>"975-300"</article>
<description>"keyboard"</description>
<price>"20.00"</price>
</line>
</detail>
</oneInvoice>
<oneInvoice>
......
</oneInvoice>
</invoices>

We want a repor with group by Inumber, the group heather has
Inumber, date, customerID, and name

The detail has a line for each <line> (article, description and price)

We construct a subreport in order to retrive detail information

The subreport datasource is:
((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("oneinvoice/detail/line/child::*")

At the preview (master report) whe obtein a line for each field, each line with 3 fields identicals It lools like this:

===========================================================
Inumber: 12345 Date: 01/02/2010
Customer: 00045 Name: aaaaaaaaaaaaaa
===========================================================
article | Description | price
===========================================================
456-098 456-098 456-098
computer computer computer
100.00 100.00 100.00
975-300 975-300 975-300
keyboard keyboard keyboard
20.00 20.00 20.00
============================================================
Then prints the next invoice

If we modify the subreport in order to work as standalone reports, it works fine.

jabin_dm's picture
Joined: Feb 10 2010 - 1:11pm
Last seen: 13 years 7 months ago
Feedback