shymaza Posted November 24, 2009 Share Posted November 24, 2009 Hi! I have an multi-value query input control in jasperserver, pass values to Collection type parameter. I need to pass this values to WHERE ... IN (value1,value2,.. valueN) in report SQL query.If use WHERE XXX IN $P{COLLECTION_TYPE_PARAMETER} it shows error: Parameter type not supported in query : COLLECTION_TYPE_PARAMETER class java.util.CollectionHow can I do IT? Link to comment Share on other sites More sharing options...
mdahlman Posted November 25, 2009 Share Posted November 25, 2009 shymaza,In general the easiest way to use multiple values with an IN clause is to use the $X{} syntax. The basic idea is this:SELECT ... WHERE $X{IN, MyColumn, MyCollectionParameter}There's a sample supplied with JasperReports and iReport: /demo/samples/query. You'll find good examples searching in this forum and the JasperServer forum too.Regards,Matt Link to comment Share on other sites More sharing options...
k_tripura Posted May 2, 2013 Share Posted May 2, 2013 $X{IN, MyColumn, MyCollectionParameter} --- this in not working for me in 5.0.4 version of iReport, I have been struggling to fix it Link to comment Share on other sites More sharing options...
k_tripura Posted May 2, 2013 Share Posted May 2, 2013 $X{IN, MyColumn, MyCollectionParameter} --- this in not working for me in 5.0.4 version of iReport, I have been struggling to fix it I am trying with a very basic select query.Still no luck so far, Any help mdahlman??? Link to comment Share on other sites More sharing options...
k_tripura Posted May 2, 2013 Share Posted May 2, 2013 I resolved this issue finally ... The reason why it was throwing error isMy iReport Langauge property is set to "Groovy" instead of "Java"NOT in tools-> Options-> Language- JavaBUT for Language in Activity Report Properties ->Language ->Java (THIS IS THE CHANGE that resolved my issue) 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