matheusluz39 Posted September 28, 2015 Share Posted September 28, 2015 Good morning, I have this parameters. <parameter name="paramString" class="java.lang.String"/> <parameter name="paramArray" class="java.util.ArrayList"/>[/code] Using visualiza.js. How can I send parameters to paramArray? visualize(function ( v ){ v("#container").report({ resource: "/public/MyProject/Reports/teste", params: { "paramString": ["Title! Hello world"], "paramArray": [???] } }); });[/code] When I tried put "paramArray": [ [1,2,3] ] Return this error: 09:56:11.468 [bi/report/Report] [visualize.js:49] [ERROR] - illegal.parameter.value.error : Can not deserialize instance of java.util.ArrayList out of END_OBJECT token at [source: org.apache.catalina.connector.CoyoteInputStream@193a86fe; line: 1, column: 489] (through reference chain: com.jaspersoft.jasperserver.jaxrs.report.ReportExecutionRequest["parameters"]->com.jaspersoft.jasperserver.dto.reports.ReportParameters["reportParameter"]->com.jaspersoft.jasperserver.dto.reports.ReportParameter["value"]) What's wrong? Thank you... Link to comment Share on other sites More sharing options...
Guest dpetzold_1 Posted October 16, 2015 Share Posted October 16, 2015 Have you tried the following format? It's essentially an array within the params array."paramArray": {}[/code] Link to comment Share on other sites More sharing options...
matheusluz39 Posted October 19, 2015 Author Share Posted October 19, 2015 Yes, I tryed.When I put: "paramArray": {1} >>> Uncaught SyntaxError: Unexpected token }"paramArray": {1, 2} >>> Uncaught SyntaxError: Unexpected token ,"paramArray": [{1}] >>> Uncaught SyntaxError: Unexpected token }"paramArray": [{1, 2}] >>> Uncaught SyntaxError: Unexpected token , Link to comment Share on other sites More sharing options...
tyson.decker Posted April 13, 2016 Share Posted April 13, 2016 Visualize.js parameters must be strings. So in your case it would be"paramArray" : ['1','2','3']The above example will send the parameter to the server properly. However, i'm not sure that you can have a parameter with type array list. I have never been able to run a report like that before. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now