pioppogatto Posted October 14, 2011 Share Posted October 14, 2011 Hi, I have a report with two java.util.Collection parameters and my report query is like that in the Code.In the report unit under jasperserver there are two input controls, pMacro is mandatory and pCategoria is not mandatory, but pCategoria get the report having all the values of the parameter if I didn't choose any value in the input control. How can I set the default value to gat ANY value? I try to put "" but I have an errorcom.jaspersoft.jasperserver.api.JSExceptionWrapper: Errors were encountered when compiling report expressions class file: 1. Cannot cast from String to Collection value = (java.util.Collection)(""); //$JR_EXPR_ID=1$ <------------------------> 2. Cannot cast from String to Collection value = (java.util.Collection)(""); //$JR_EXPR_ID=1$ <------------------------> 3. Cannot cast from String to Collection value = (java.util.Collection)(""); //$JR_EXPR_ID=1$ <------------------------> 3 errors Thank youCode:SELECT * FROMstatisticwhere $X{IN, macrocategoria, pMacro} OR $X{IN, categoria, pCategoria} Link to comment Share on other sites More sharing options...
ADR707 Posted January 3, 2012 Share Posted January 3, 2012 When you use " " as the default value, jasper server expects the parameter to be of the type String.But as per your explanation, you are using parameter of collection type; hence try using [" "] instead of " " 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