Jump to content
We've recently updated our Privacy Statement, available here ×

unable to pass data to subreport


sujitvin

Recommended Posts

Hi,

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

<SHIPMENT>

<SHIPMENT_ID> ABCD </SHIPMENT_ID>

<ORDER_RELEASE>

<ORDER_RELEASE_XID> 23454434532 </ORDER_RELEASE_XID>

<ORDER_RELEASE_DATE>2013-07-08</ORDER_RELEASE_DATE>

</ORDER_RELEASE>

<ORDER_RELEASE>

<ORDER_RELEASE_XID> 5432342322 </ORDER_RELEASE_XID>

<ORDER_RELEASE_DATE> 2013-07-09</ORDER_RELEASE_DATE>

</ORDER_RELEASE>

</SHIPMENT>

 

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?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...