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

SubDataSet in chart with Parameter


micmayers_i

Recommended Posts

Hello

I´ve found following code for using subDataset in Charts.

This Code is working without the parameter.

My Question now is, how to pass the parameter to the JRXmlDataSource.

Thanks very much

mic

 

 

 

Code:
<lineChart><chart>...</chart><categoryDataset><dataset>	<datasetRun subDataset="Parameter">		<datasetParameter name="param">			<datasetParameterExpression></datasetParameterExpression>		</datasetParameter>		<dataSourceExpression><![CDATA[new   net.sf.jasperreports.engine.data.JRXmlDataSource(new java.io.File("C:\\test.xml"),  "/test[@id='$P{param}']/tested")]]>		</dataSourceExpression>	</datasetRun></dataset>
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Should be able to righ click the sub-dataset in the report inspector and bring up the properties, within there if I recall is a parameter mapping section which allows you to map parameters in the sub-dataset from the calling report.

 

Link to comment
Share on other sites

Hy

dosen´t works with the part 

"[@id=$P{param}]"

doesen´t matter which settings I tried in the parameter Tab (under drop down box "Sub dataset").

Mayby you can tell me a bit more explicite how to set the parameter for the dataSourceExpression.

Thanks mic



Post Edited by micmayers_i at 05/25/2011 10:44



Post Edited by micmayers_i at 05/25/2011 10:45
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...