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

Has the Syntax for an JRXMLData expression changed?


ddavis539

Recommended Posts

I'm using JasperReportStudio Community v 6.15.0 to design a new report.  The following subreport definition in a parent report.  I'm using xml files generated by my server as the datasource, and the syntax I'm using has been used in at least a dozen other reports without any problems.  I have successfully ran the subreport as a standalone report, using a xml data source with the full xml path as expressed below.

When I run the parent, nothing appears in the generated pdf file.  If I modify the data expression to to use an empty datasource, I do see the subreport appear where I expect it to, with null appearing where text would normally be.  The only difference between it showing up and not is the datasource expression.  I've opened up the error.log and there are no messages in there related to this.  Is there a new way to express a sub-XML datasource?  What's weird to me, is I can open up any of the older reports using a nearly identical dataSourceExpression (differing only in the xpath part) and they run just fine from the same environment.   This is bafflilng and frustrating.  Is there a new syntax to pass in an xml datasource, or is there another debug file I could look at to figure out what's going on?

 

 For an empty dataset I'm using:

<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource()]]></dataSourceExpression>

Non-working subreport:

<subreport>

<reportElement x="69" y="70" width="489" height="90" uuid="984977e0-78aa-4f20-a05b-1048fe69e0f1"/>

<subreportParameter name="IMAGE_DIR">

<subreportParameterExpression><![CDATA[$P{IMAGE_DIR}]]></subreportParameterExpression>

</subreportParameter>

<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/profiles/profile/tips/tip")]]></dataSourceExpression>

<subreportExpression><![CDATA["Report_Tips.jasper"]]></subreportExpression>

</subreport>

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...