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

How to use Variables in Xpath


fatsy

Recommended Posts

Hallo,

I have master report which has a variable declared in it.The subreport ist using its own data expression i.e (net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/UseCaseGroup/UseCaseGroup/UseCase[@id=$V{ID}]/MainScenario/Step")]]

But unfortunately the subreport part is blank.

So my question did I not correctly my XPath or what i'm I supposed to do to make them visible.

 

Any help or suggestion will be very appreciates

Thanks in advance

Your

Fatsy

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You need something like

Code:

<dataSourceExpression>
((net.sf.jasperreports.engine.data.JRXmlDataSource) $P{REPORT_DATA_SOURCE}).dataSource("/UseCaseGroup/UseCaseGroup/UseCase[@id='" + $V{ID} + "']/MainScenario/Step"«»)
</dataSourceExpression>

 

HTH,

Lucian

Link to comment
Share on other sites

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