Using a parameter as a datasource

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!
gabrielbondor's picture
Joined: Aug 28 2013 - 1:55am
Last seen: 10 years 1 month ago

0 Answers:

No answers yet
Feedback
randomness