Jump to content
Changes to the Jaspersoft community edition download ×

All I want is a published, Studio generated report, with a pull down list parameter for all, many or one list items


martin.clarke

Recommended Posts

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 in

http://community.jaspersoft.com/questions/542182/selecting-parameter-values-sql-query

from 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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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