Jump to content
JasperReports Library 7.0 is now available ×

SQL exception using $P!{Parameter}


kingsnet

Recommended Posts

I have a multi-select on a form that returns an SQL syntax error [fred blogs],[harry smith] for the values selected. Where do the brackets come from? I'm using the latest jasperserver recently downloaded.

 

I'm using WHERE myfield in $P!{Parameter}. I also tried "$P!{Parameter}" and '$P!{Parameter}'. iReports and Jasperserver give the same error. My parameter is a collection. How do I get a list of values from a form? I tried $X but I get field $X not recognised so I went back to $P! as it's comes closest to getting me a result.

 

Can anyone help please?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

if you want to use myField in $P!{Parameter}, Parameter should be a String with a value like "(2,4,7)".

 

If you want to keep Parameter as a Collection, use $X(IN, myField, Parameter)

 

Also, make sure you have the latest version of iReport and JasperReports, as the $X feature isn't available in some of the earlier ones.

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