unable to pass data to subreport


I am trying to insert a sub report in a master report with datasource as XML file.

Simplified structure of the file is as below













i have created a master report to display SHIPMENT_ID whereas want to create a subreport for obtaining infomraiton from each ORDER_RELEASE.

I have inserted the subreport in detail band of master report. Datasource expression is set to ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/SHIPMENT/ORDER_RELEASE"). The master report xpath record node is /SHIPMENT whereas that of sub report is /SHIPMENt/ORDER_RELEASE.

ORDER_RELEASE_XID and ORDER_RELEASE_DATE are both in the Page Header band of the sub report.

However I am unable to get data on the sureport. At times it shows only one row or first encountered ORDER_RELEASE tag..

I am expecting that the subreport for above data XML should run twice first with information of ORDER_RELEASE_XID = 23454434532 and ORDER_RELEASE_XID = 5432342322

Can someone help?

sujitvin's picture
Joined: Jul 21 2012 - 9:00am
Last seen: 9 years 6 months ago

0 Answers:

No answers yet