Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

List Control select option

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 19
Accepted Solution

List Control select option

Hi,

 

Is there any way I can select all the values in a list control while I am on the report viewer. I am able to do that in report designer however not in the report viewer.


Accepted Solutions
Solution
‎10-19-2017 12:19 PM
Contributor
Posts: 29

Re: List Control select option

Posted in reply to ayushupadhyay22

Sure ..

1. Create a table with one column and two records: Column name= "Selection_Options" values:{"Custom", "All"}

2. Add this table to your report designer

3. Create a new report section for our test

4. Create a prompt container

3. Drag two: Drop-Down and List controls in the prompt container

4. In the Drop-Down, drag and drop the column from our new support table "Selection_Options"

5. Create a character based parameter "Selected_Option"

6. Assign this parameter to the drop-down so that it picks up the value of our selection from the drop-down

7. In your main table, create a calculated item "List_calculated_var", and make it like:

If ('selected_option'p = 'Custom') then List_variable  /* List_variable is the one you want to assign to the list, so that it populate the list with all the values for selection */

else if ('selected_option'p='All') then "All" /* In this case "List_calculated_var" will only have one value "All".

8. Create a character list based parameter "Selection"

9. Now to your list control in the prompt container, assign "List_calculated_var" as category and "Selection" as Parameter

10. Now you have a parameter "Selection" having either "All" or "Custom" values and you can use this parameter in other controls ..

 

hope it helps ..

 

View solution in original post


All Replies
Contributor
Posts: 29

Re: List Control select option

Posted in reply to ayushupadhyay22

It doesn't "select all" directly but you can subset the list data by another control's parameter .. try using drop-down + list control combination to subset the selection list ..

Occasional Contributor
Posts: 19

Re: List Control select option

Posted in reply to ali_jooan

Can u give me an example

Solution
‎10-19-2017 12:19 PM
Contributor
Posts: 29

Re: List Control select option

Posted in reply to ayushupadhyay22

Sure ..

1. Create a table with one column and two records: Column name= "Selection_Options" values:{"Custom", "All"}

2. Add this table to your report designer

3. Create a new report section for our test

4. Create a prompt container

3. Drag two: Drop-Down and List controls in the prompt container

4. In the Drop-Down, drag and drop the column from our new support table "Selection_Options"

5. Create a character based parameter "Selected_Option"

6. Assign this parameter to the drop-down so that it picks up the value of our selection from the drop-down

7. In your main table, create a calculated item "List_calculated_var", and make it like:

If ('selected_option'p = 'Custom') then List_variable  /* List_variable is the one you want to assign to the list, so that it populate the list with all the values for selection */

else if ('selected_option'p='All') then "All" /* In this case "List_calculated_var" will only have one value "All".

8. Create a character list based parameter "Selection"

9. Now to your list control in the prompt container, assign "List_calculated_var" as category and "Selection" as Parameter

10. Now you have a parameter "Selection" having either "All" or "Custom" values and you can use this parameter in other controls ..

 

hope it helps ..

 

Occasional Contributor
Posts: 19

Re: List Control select option

Posted in reply to ali_jooan

Thanks that works

New Contributor
Posts: 2

Re: List Control select option

Posted in reply to ali_jooan

I've dutifully followed your instructions until I got to step 9, then I got "This report object does not support parameter assignment."

I'm using SAS VA v7.3 and it looks like I can't add a parameter to a list object?  Are there any other options for me to "select all" and "clear all" in a list control?

Contributor
Posts: 29

Re: List Control select option

you can right click in list control and "Select All" or "Select None" ..

 

didn't know that the list control in 7.3 doesn't have parameter role .. in 7.4 it does ..

 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 1040 views
  • 0 likes
  • 3 in conversation