Friday, October 17, 2008

Expand Collapse all columns in SSRS reports by one single option

To expand and collapse all columns in your report by selecting a single option:

here by selecting a value to a parameter 

1. create one Report parameter

 parameter name: showall

which has non-queried values as follows:
label             values
~~~              ~~~~~
Yes               Expanded
No                Collapsed

 Initial value is: 
Non-Queried : Expanded

2. set visibility property of the row select and write:

=iif(Parameters!ShowAll.Label ="No",true,false) 
=iif(Parameters!ShowAll.Value = "Collapsed", True, False)  

set toggleItem to a textbox (eg: textbox1)

3. set (textbox1) InitialToggleItem property select and write:

=iif(Parameters!ShowAll.Label ="Yes",true,false) 
=iif(Parameters!ShowAll.Value ="Expanded",true,false)  



ShowAll? Yes


ShowAll? No

now u can make all the report data to expand and collapse in single option...

also refer to my post in msdn forum.




Rachele said...

Thanks! This works well in Visual Studio but not in Report Manger. When I go to view the report after deploying with these changes, it doesnt work. Why!? Is there a fix for this?

Developer said...

With Visual Studio 2005 this work. You can go to blog which has other SSRS help.

Thanks for sharing