Passing Multiple Value to Jasper Server via REST_v2

Hi folks,

does anyone knows how I can pass multiple values to the jasper server via the rest_v2 interface?

I use this for a singleValueText: host/reports/Reports/Report.pdf?PARAM=Text

I use this for a singleValueDate: host/reports/Reports/Report.pdf?START_DATE=2015-03-02&END_DATE=2018-03-18

But how is the syntax for multiple values?

Best Regards

Florian

florian.johannssen's picture
Joined: Sep 25 2014 - 8:25am
Last seen: 6 years 2 weeks ago

2 Answers:

Look into JRS-web-services-guide.pdf

Following is the example from the pdf

http://<host>:<port>/jasperserver[-pro]/rest_v2/reports/reports/samples/Cascading_multi_select_report.html? Country_multi_select=USA&Cascading_state_multi_select=W A&Cascading_state_multi_select=CA 

 

nthapa's picture
1273
Joined: Jan 24 2014 - 9:53am
Last seen: 7 years 3 months ago

Ok, and how should I define the parameter in the jasper studio?
As java.util.List or java.util.Collection?

My parameter looks like: <parameter name="Countries" class="java.util.Collections"/>

Is the syntax correct for several Countries like USA, Mexico, Germany:

http://<host>:<port>/jasperserver[-pro]/rest_v2/reports/reports/samples/Cascading_multi_select_report.html?Countries=USA&Countries=Germany&Countries=Mexico

Could this works, if I define the parameter as java.util.Collection und using it within my SQL Query: $X{IN, country,Countries}

Best Regards

Florian

florian.johannssen - 8 years 6 months ago

Ok, and how should I define the parameter in the jasper studio?
As java.util.List or java.util.Collection?

My parameter looks like: <parameter name="Countries" class="java.util.Collections"/>

Is the syntax correct for several Countries like USA, Mexico, Germany:

http://<host>:<port>/jasperserver[-pro]/rest_v2/reports/reports/samples/Cascading_multi_select_report.html?Countries=USA&Countries=Germany&Countries=Mexico

Could this works, if I define the parameter as java.util.Collection und using it within my SQL Query: $X{IN, country,Countries}

Best Regards

Florian

florian.johannssen's picture
Joined: Sep 25 2014 - 8:25am
Last seen: 6 years 2 weeks ago
Feedback
randomness