tomo.pinjuh Posted April 28, 2020 Share Posted April 28, 2020 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 Link to comment Share on other sites More sharing options...
mlopez_1 Posted April 29, 2020 Share Posted April 29, 2020 Try java.util.List instead of java.util.Collection and don't use nested type.Mariano Link to comment Share on other sites More sharing options...
tomo.pinjuh Posted April 29, 2020 Author Share Posted April 29, 2020 Can I use non-predefined values on the jasper server for that field as the list parameters? Link to comment Share on other sites More sharing options...
mlopez_1 Posted April 30, 2020 Share Posted April 30, 2020 Yes you can. There will be an empty list, not null list.Mariano Link to comment Share on other sites More sharing options...
tomo.pinjuh Posted April 30, 2020 Author Share Posted April 30, 2020 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 Link to comment Share on other sites More sharing options...
mlopez_1 Posted April 30, 2020 Share Posted April 30, 2020 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now