Kumar_rahul Posted January 24, 2008 Share Posted January 24, 2008 Hi All, I am using a multi-select input-control. The data to be displayed is being fetched from Database based on an input control query. I want to display some of the values pre-selected in the list, based on some conditions. Does JasperServer support this feature? Any Help/ Suggestion? Regards,Kumar Rahul. Link to comment Share on other sites More sharing options...
lucianc Posted January 24, 2008 Share Posted January 24, 2008 The JasperServer input controls use as default values the report parameter default value expressions. You will have to write an expression that evaluates to a list/array of values that should be selected by default. HTH,Lucian Link to comment Share on other sites More sharing options...
mdahlman Posted February 5, 2008 Share Posted February 5, 2008 Kumar, Here are a couple of sample default values that I have used with multi-select params. java.util.Arrays.asList(new String[]{"String1", "String2"}) java.util.Arrays.asList(new java.lang.Integer[]{new java.lang.Integer(1), new java.lang.Integer(2)}) Regards,Matt Link to comment Share on other sites More sharing options...
dasari16 Posted August 6, 2013 Share Posted August 6, 2013 <parameter name="manager" class="java.util.Collection"> <defaultValueExpression><![CDATA[java.util.Arrays.asList(newString[]{"Naveen","Sharad"})]]></defaultValueExpression> </parameter>[/code]Hi I tried in the way it is suggested above but, i am getting an Error unexpected token: Naveen @ line 163, column 64. 1 error Here are my code's 1) java.util.Arrays.asList(new String[] {"Naveen","Sharad"}) 2) new ArrayList(Arrays.asList(new String[] {"Naveen","Sharad"})) Can you correct me please 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