danlee1000 Posted April 11, 2014 Share Posted April 11, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now