Jump to content

Passing the values of multi-select query input control in jasperserver


giuliana.damiani

Recommended Posts

Hi,

I have a problem with passing values from a input control to an other. In particolar the first input control PARAM1 is a multi-select query (type: java.util.Collection) and it returns the following value: [11,22,33]. The values are integer ! Now, this values enter in the query in the second input control like this $X{IN,cast(attribute(integer) as varchar(255)),PARAM1}. This expression work in the query report, but don't in the query of the input control? Why? Is there the possibility to transform the PARAM1 type from java.util.Collection to java.util.String? This could solve the problem. There is someone who can help me?  Thank you very much.

Link to comment
Share on other sites

  • 8 months later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

java.lang.Integer should work for multi select parameter.

I have tested. by inputting integer values to select mutlple. ( Where we generally assume mutli select should take collection but with integer values we have to take java.lang.Integer for parameter instead java.util.Colleciton).

from 4.7 and greter versions this supports. . We need not to cast in WHERE clause syntax of multi select.

 

Thank you.

Sadakar

Link to comment
Share on other sites

Thank you so much Sadakar for your help!

I set the parameter type to integer and it works,but if I want to pass it to a subreport or to a dataset it doesn't work.

Now with Jasperstudio 5.6.2 I solve this issue: you can specify the type of collection.In my case the type is integer and it Works perfectly with the subreport and dataset.

 

Best Regards,

 

Giuliana

 

Link to comment
Share on other sites

  • 1 year 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...