martin.clarke Posted June 26, 2015 Share Posted June 26, 2015 I'm running a parameterized report in JasperReports Server.It has two parameters, one is a java.lang.String and works fine in versions of the report with just that.The other is a java.util.List pull down list. This errors with:net.sf.jasperreports.engine.JRRuntimeException: Invalid type java.lang.String for parameter CustomerOrganisationList used in an IN clause; the value must be an array or a collection.I take it the 'value' being referred to is that being selected from the pull down list. Where that is defined as a java.lang.String I haven't the faintest idea. UNLESS the error is saying that the parameter CustomerOrganisationList is a java.lang.String. It isn't. In Studio it's a java.util.List as mentioned above. Convert the CustomerOrganisationList java.lang.String to an java.sql.Array or java.util.Collection OR the 'value' needs defining as an array or a collection. How please?I have adapted the excellent Carl Barlow's response inhttp://community.jaspersoft.com/questions/542182/selecting-parameter-values-sql-queryfrom iReport to Studio. I can run the report in the painful Studio Preview mode.Is there a how-to on this anywhere please?I've tried this:http://community.jaspersoft.com/documentation/jasperreports-server-administration-guide/v550/query-based-input-controls It's such a simple requirement, I'm astounded that there isn't a single worked example anywhere. I've spent six days on this so far. I'm old and dumb, but I am stubborn.Martin$ martinpeterclarke@hotmail.co.uk $ 24/7 $ Link to comment Share on other sites More sharing options...
martin.clarke Posted July 1, 2015 Author Share Posted July 1, 2015 The answer is here if anyone is out there:http://community.jaspersoft.com/questions/542182/selecting-parameter-values-sql-query#comment-816926 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