How to pass subDataset in list component

0

I am new in Jasper report 

 

In my project I have use the version of jasper report is 6.3.1 and take a datasource as json data sorce.

In my report designing portion I have created one subDataset and take one list component . Now i want to use that subDataset  into my list component so how this task is achive.

I have try to take dataSourceExpression like :

<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("property")]]></dataSourceExpression>

but its produce the exception like 

Caused by: java.lang.ClassCastException: net.sf.jasperreports.engine.JREmptyDataSource cannot be cast to net.sf.jasperreports.engine.data.JsonDataSource

nidhi.naik's picture
Joined: Aug 3 2017 - 4:04am
Last seen: 2 years 3 months ago

1 Answer:

0

Hallo,

In first, check if the default data_adapter has been defined like:

<property name="com.jaspersoft.studio.data.defaultdataadapter" value="src\main\resources\data_adapter.json"/>

if it is not, you get the error message by try to run you report

alexander.nemzew's picture
Joined: Sep 11 2017 - 5:29am
Last seen: 2 years 2 months ago
Feedback
randomness