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

Passing list to input control using $X in query


contentengineer

Recommended Posts

We have created a report using the $X{IN,colName,paramName} notation.

 

(1) iReport does not parse this notation correctly; "Unrecognized SQL escape 'IN' "

 

AND

 

(2) Non of the input controls enable a user to enter a comma separated list of variables. We get Java exceptions if we choose "single value" before the parameters is displayed in the workflow.

 

iReport2.0.2 JasperServer2.0

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Forget that approach.... this is far simpler:

 

 

SELECT a FROM b where c in ('$P!{paramName}');

 

Then setup two parameters:

 

name: paramInput type: String

default to: "X,Y,Z"

 

name: paramName type: String

default to: $P{paramInput}.replace(",","','")

 

produces a beautifully parsed query when paramInput is set as a single entry value (type: String)...

 

Forget $X !!!

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