Added more info
- For me JSON is the datasource.
- We receive JSON by hitting rest API. Rest API may need few parameters to pass.
- Now the parameters that API needs and jasper parameters are configured in JRXML. In below example ReportTypeList, ReportType,dateParam, SheduleDate are params configured in JRXML.SheduleDate is filter parameter to query JSON. ReportType and DateParam will be used to hit the API to get the JSON data source.
Now if you observe below for ReportTypeList they have mentioned something like defaultValueExpression in which they are trying to keep some set of values. Now I need to read this set from Java and and populate these values in a combobox on UI dynamically.
For parameter ReportType I need to get the default value if user have not selected anything from UI I need to consider the default value.
For example:
<parameter name="ReportTypeList" class="java.util.List">
<defaultValueExpression><![CDATA[$P{ReportTypeList}.set( "Daily", "Weekly",Monthly" )]]></defaultValueExpression>
</parameter>
<parameter name="ReportType" class="java.util.List">
<defaultValueExpression><![CDATA[$P{ReportType}.get[0]]]></defaultValueExpression>
</parameter>
<parameter name="DateParam" class="java.util.Date"/>
<parameter name="SheduleDate" class="java.util.Date"/>