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

Passing a new XML data source to a sub report


danlee1000

Recommended Posts

I am trying to generate a report using both SQL *and* XML data sources in the same Jasper report.

The main report uses a SQL data source.

I created another report that uses an XML data source, which I am trying to embed as a sub report inside the main report with the following XML statements:

<subreport>
  <reportElement x="19" y="11" width="536" height="102" uuid="c7a452ed-9e89-4d4e-966b-41cb790abef6"/>
  <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRXmlDataSource("/Users/danlee/Downloads/sample-FasDocumentRequestEvent.xml")]]></dataSourceExpression>
  <subreportExpression><![CDATA["/Users/danlee/FasDocumentRequestReport_XMLTest.jasper"]]></subreportExpression>
</subreport>
 
I did a preview in iReport Designer. It compiles, but the subreport returns just 'null' instead of a correct value that it normally returns when it was run as a main report. What could be a problem?
 
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...