shubhangi.10p Posted April 19, 2016 Share Posted April 19, 2016 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 More sharing options...
kkriplani Posted April 19, 2016 Share Posted April 19, 2016 Hi,It is achievable but I suppose it will get way too complicated.Why dont you try using a single select query input control type instead?Single select query IC will let you select only one value at a time only.Hope this helps,KKriplani Link to comment Share on other sites More sharing options...
shubhangi.10p Posted April 19, 2016 Author Share Posted April 19, 2016 Hi,Client rquirement is to have multi-select and mandatory, plus he is wishing that if there are multiple values in list then none should be selected by default.Even if there is a complicated way, please let me know. Atleast i can give a try.Thanks,Shubhangi. Link to comment Share on other sites More sharing options...
kkriplani Posted April 20, 2016 Share Posted April 20, 2016 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 More sharing options...
shubhangi.10p Posted April 20, 2016 Author Share Posted April 20, 2016 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 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