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

Passing sql query as a parameter in $X{} - jaspersoft studio 5.6.2


vhp1990

Recommended Posts

Hey,

     I would like to obtain the values for a 'where in' clause using a query. That is , for $X{IN, colName, parameter}, I want to provide the parameter as a query. In normal where conditions, we use $P!{} and pass the query as a string. In case of $X how do we do this ? Kindly help. Thanks in advance.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

So I'm not a hundred percent I understand your question but when I've used $X{} in the past what I've done is create a parameter of type Collection<Integer> (for primary keys) and then the WHERE statement becomes $X{IN, col, param} then in jasperserver when you define the parameter you can choose to use a query and specify a value column and a display column. This means that while working within studio you have to enter a list of ints instead of getting to use the query but in the server it all works seamlessly. I hope that helps answer your question!

Link to comment
Share on other sites

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