I have main report with parameter called list_departments:
<parameter name="list_departments" class="java.util.Collection" nestedType="java.lang.String" evaluationTime="Early"> <defaultValueExpression><![CDATA[new ArrayList(Arrays.asList(new String[]{}))]]></defaultValueExpression> </parameter>
Generating a report through the jasper studio works fine.
But when deploy it on server, i have problem with rest /rest_v2/reportExecutions (code written in python - flask):
payload = { "reportUnitUri": "my_name", "async": True, "outputFormat": "pdf", "interactive": True, "ignorePagination": False, "parameters": { "reportParameter": [{"name": "list_departments", "value": ["val1","val2"]},...] } }
All other parameters are well processed and displayed on the report except this one, which is displayed as an empty list, although something has been sent (val1, val2).
Cannot find out where the problem is occurring, please help
Can I use non-predefined values on the jasper server for that field as the list parameters?
Yes you can. There will be an empty list, not null list.
Mariano
Ok, but i want when i pass the list to print it in the report, however it is always blank, and this is a problem
Well, make sure that you pass an input control with the same ID than report unit's parameter and make sure that input control is multi select an parameter is java.util.List.
I used much of this type and works well.
Mariano