Welcome to MSDN Blogs Sign in | Join | Help

How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

The short answer is that you can’t, although there is a workaround. Essentially, “(Select All)” as implemented in Reporting Services simply does this:

if (all parameter values/members are already selected)

{

deselect all values/members

}

else

{

select all values/members

}

 

You can still get the behavior you want however, assuming that your parameter values are query-based. If you populate your parameter list with a dataset, just use the same dataset to set your default values. This technique will work regardless of whether you’re dealing with SQL or SSAS.

In the attached example RDL the “technique” is demonstrated for both a SQL and SSAS-based data source. (You’ll need the AdventureWorks database and cube samples installed)

Published Monday, May 07, 2007 2:39 PM by russch
Attachment(s): DefaultSelectAll.rdl

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Friday, September 28, 2007 2:03 PM by bob press

is there any way to pass 'All' as a parameter to an MDX query in SSRS?

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Saturday, September 29, 2007 10:10 PM by bob press

HI - I am pass ing the qualified member name:

[Regions].[RegionsDesc].[All]

to a report. This works fine, delivering all regions. However, when I click on a cjart in this report to pass this parameter along with otheres, the next report sees only the first member of the region group. Any ideas?

Thanks

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Wednesday, October 03, 2007 5:59 AM by russch

Does your other report except multi-value parameters? If so, you'll need to pass the entire "array" of values you've selected in the first report do it using either split() or join(). I think there is a thread out on the MSDN forums by one of the developers that explains the whole situation. Try searching there on "split, join, and subreport"

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Friday, November 23, 2007 5:11 AM by NIck Thompson

Thanks for this solution. One point to add - if you find that RS is still not showing your default value as 'Select All', check your dataset for null values. If it contains a null value, but your report parameter is set to not allow nulls, RS will revert to not selecting any values by default.

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Monday, September 15, 2008 6:08 AM by Madhavi

Thanks u so much. the given example is very suitable to my prob. i have another query with the continuation of above solution.

Query: in the report field using join() i am retriving all the selected parameter values but for each and every row all values are getting. instead of this the related values only retrieve.

Example: Player played balls in cricted match

for player1 - 1,3,5 balls

for player2 - 2,8 balls

Like this all the selected balls should split based on player.

can any one resolve this issue.

Thanks in advance

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Wednesday, November 05, 2008 10:36 PM by Mikey Mileos

Madhavi:

In your current situation you will have a query that populates all the players and a query that populates the balls (with all the balls).

What you need is a 3rd query that takes the players as a param and only gives you the balls that are the defaults for the players, so if they enter player2, it only returns 2 and 8, and player1 returns 1,3,5.

Then what you do is set the available values with the original balls query, and set the default values with the new query that only selects the default ones.

This should then show all balls in the list but only select the ones that are defaults.

Cheers,

Mikey

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Tuesday, November 25, 2008 1:06 PM by James

I have tried this solution and IT SIMPLY NOT WORKING. No matter how many times I try setting the default value to the SAME!!!  dataset as the available values, it's NOT selecting everything. God I'm pissed off.

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Friday, November 28, 2008 4:04 AM by Narendra Jangid

This is still not working. Anybody will solve this problem????

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Friday, November 28, 2008 4:07 AM by Narendra Jangid 09819955864

This is still not working. Anybody will solve this problem????

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Monday, December 29, 2008 8:43 PM by polczym

Although this works initially, the results are cached and this creates a problem.  For example, if you have all of 10 items selected, then list a subset of those 10, say for example 5 of 10, all 5 will be correctly selected. But when you go back to list all 10 items, only the 5 that were selected in the last request will be selected.

This should be an easy bug to fix Microsoft !! It is really an annoyance.

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Thursday, April 02, 2009 12:27 PM by Ann

Worked like a charm - thank so much!

# re: How do you set “(Select All)” as the default for multi-value parameters in Reporting Services?

Tuesday, September 22, 2009 11:26 AM by polczym

Almost 10 months have passed and I still haven't seen a viable solution.  I see a lot of workarounds for various examples, but the problem still exists.  I did see a hint though. When I added a second record with the same values (UserID, 1) and (UserID, 1), the first UserID value was selected correctly, but the second one wasn't.  Hmmm.

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker