Passing a Collection to Jasper Server via REST_v2 api


Hi folks,

I have a report with a parameter as type of a java.util.collection. I am using this parameter in the SQL of my Jasper-Studio as: AND $X{IN,country,MyCountries}

I am not able to pass the value into the MyCountries parameter via the restv2 api in the URL.

I try to call the report like: 

GET http://HOST:8080/jasperserver/rest_v2/reports/Reports/MyReport.pdf?MyCou...

The problem is, that the parameter USA and Mexico will be ignored. Has anyone a suggestion? This would be very very helpful.


Best regards


florian.johannssen's picture
Joined: Sep 25 2014 - 8:25am
Last seen: 1 year 10 months ago

2 Answers:


If the report parameter is a collection using multiple values, you can specify them using the ampersand (&), such as



For example (using our sample Revenue Detail Report tested in JRS 6.0.1):


tchen's picture
Joined: Feb 27 2008 - 7:33am
Last seen: 16 hours 15 min ago

Thank you very much for your answer. If I follow our suggestion, the parameter ProductFamiliy is empty by running the report (An empty list will be printed). The type of the parameter is java.util.collection.
It seems to be that the input data of the client like Drink and Food will not pass to the Jasper Studio Collection Parameter :(
Do you know what I am doing wrong?

Best Regards


florian.johannssen - 4 years 4 months ago

If you have sample report deployed in JRS repository, you should have "Revenue Detail Report" under public samples reports folder. This report has a collection type parameter named "ProductFamily". The following URL will provide the selected collection values "Drink" and "Food" to the report unit through a REST V2 report execution.


The above URL is used to test in a JRS 6.0.1 instance and it should work. Are you using the exact syntax when run your test? Which version of JRS are you using?

Notice the following part in the URL is REPORT SPECIFIC:


If you have your report unit named MyReport deployed under /public/project/reports folder, and your report has a collection parm named InputList, then the URL for your report and parms should be


tchen's picture
Joined: Feb 27 2008 - 7:33am
Last seen: 16 hours 15 min ago