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

multi-select query (checkbox)


shubhangi.10p

Recommended Posts

Hi,
I have a multi-select query (checkbox) which is populating dynamic list from DB.
the client requirement is, if we have a single value in list then it should be checked and if there are multiple values in list then none should be selected by default.
Is there any way to achieve this.

Thanks,
Shubhangi.

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

Okay I see.
I can think of one more simple method. Using this method, even if you select more than one checkbox, the check box may seem to have been selected but none will pass in the main query.
To do so, use a simple $P!{abc} called the conditional parameter. 

The implementation is as follows;
1) Create a parameter, lets say $P{abc}
2) Lets consider the parameter in which the multiselect be named as $P{xyz}
3) For the default expression of parameter abc, state the condition as :
               $P{xyz}.size() = 1 ? $P{xyz} : "null"

4) In the main where this query is sending in its data, define the query as:
   .... where event_type IN ($P!{abc})....

This is just a thought and logically possible.
Hope this helps,
KKriplani

Link to comment
Share on other sites

Hi,

The client requirement is on jasper server page -input control is multi select query check box.

When the multi select query check box value is 1, then it should be checked and if there are multiple values for this check box then none of the values should be checked.

How to achieve this in jasper server.

 

Thanks,

Shubhangi.

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