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

berk.caputcu

Members
  • Posts

    2
  • Joined

  • Last visited

berk.caputcu's Achievements

  1. We took a different approach. Instead of sending the parameter as array, we are sending the array as comma separated string to another parameter. And from iReport, we set the default value of the Collection parameter to get the value from this other parameter and parse it into an array. I know it's not the neatest solution, but it was the only way we could get it to work. Let me explain it with simple code samples. array_parameter is the Collection type parameter we want to initialize. We tried it like this but it didn't work. array_parameter [1, 2, 3] [/code]That's why we took this approach: This is the XML we send to the rest api. You should create a new parameter in your report with the name array_parameter_csv and make sure that the new parameter is at the top (or before the actual Collection parameter).--For the code below don't forget to initialize xsi and xs-- array_parameter_csv 1, 2, 3 [/code]And then from iReport, set the Default Value Expression for the Collection parameter to: new ArrayList(Arrays.asList($P{array_parameter_csv}.split("\s*,\s*")))[/code]And it works...
  2. Jasperserver v4.5 We are having difficulties with scheduling a report by using rest api. We are able to schedule a report that only accepts string parameters however the problem begins with a report that has a java.util.Collection type parameter. We tried everything but couldn't find the correct type for java.util.Collection. Right now this works: string_input test [/code] But we couldn't get this working: array_parameter [1, 2, 3][/code]When I looked into the code, I can see that jasperserver ws accepts arrays, however there is no documented way to send the arrays or array types. What is the correct way to solve this issue? Thanks
×
×
  • Create New...