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

Jasper REST pass collection as parameter


felipegdr

Recommended Posts

I have a report which receives a List parameter to use it in a IN clause:

 

`$X{IN, personID, _personID}`

 

The report works when running it through the web application or remote repository view in iReport.

 

Now I need to call it using the REST api. I have tried several different ways of passing the list value in my resource descriptor but none of them worked. 

 

 

    <resourceDescriptor name="Test_Report" wsType="reportUnit" uriString="/Test/Test_Report" isNew="false">
<parameter name="_personId" isListValue="true"><![CDATA[1]]></parameter>
</resourceDescriptor>[/code]
 

 

The above example returns the following error:

 

`Invalid type java.lang.String for parameter _personId used in an IN clause; the value must be an array or a collection.`

 

 

I have also try the following:

 

    <parameter><name>_personId</name><value isListValue="true">3</value>    </parameter>[/code]
 

 

But this returns a report with all the records, not only the person with Id=3.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...