Jump to content
We've recently updated our Privacy Statement, available here ×

REST API & Collection parameters issue


jyka.saario

Recommended Posts

Hello!



I’m struggling with REST API (v2). Here is my case:



I need to pass parameters to my SQL query what uses SQL IN. I found several examples where this is explained.



In Jasper Studio (latest version), my parameter is named as ID_ARR. Param class is set to java.util.Collection (have tried List as well). Only name & class is set for parameter.



 



In SQL this is used like: where $X{IN, id, ID_ARR}



 



All works like charm when I use preview in my Jasper Studio.



 



Now I need to run this report via REST API request. This is URL for report:



http://localhost:8080/rest_v2/reports/Reports/TestReport.pdf?interactive=true&onePagePerSheet=false&freshData=true&saveDataSnapshot=false&ID_ARR=1469&ID_ARR=1470&ID_ARR=1471&ID_ARR=1472&ID_ARR=1473



 



Report will be returned just fine, BUT ID_ARR variable remains always empty and all data is returned from table, so where IN is not executed at all?



Any ideas what I’m doing wrong?



 



I use latest JasperStudio & Jasper Server (6.4.0)


Link to comment
Share on other sites

  • 1 year later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...
  • 7 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...