Jump to content
We've recently updated our Privacy Statement, available here ×

Default Select values in Multi-select prompt


Kumar_rahul

Recommended Posts

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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 2 weeks later...

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

  • 5 years later...

<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

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