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

Using a parameter as a datasource


gabrielbondor

Recommended Posts

i have a jasper .jrxml template file and a parameter defined like this <parameter name="relativesList" class="java.util.List"/>. i would like to use this parameter as a datasource for a list, but it doesn't work. The list is always empty. This is how i set the datasource.

<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRMapCollectionDataSource($P{relativesList})]]></dataSourceExpression>

And this is how i define the dataset.

<subDataset name="relativeDataSet" uuid="de1b6afc-f2db-4568-af5d-56f0287976b3">
<parameter name="bullet" class="java.lang.String"/>
<field name="relativeEntry" class="java.util.HashMap">
<fieldDescription><![CDATA[_THIS]]></fieldDescription>
</field>
 
Please tell me why the list is always empty. The parameter passed to the document i'm sure that is not empty.
Thank you!
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...