Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Conditionally collapse columns

Author  Topic 

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2013-11-21 : 17:01:59
Say I have these columns in my report:

foo
bar
fum
baz

Say that I want to conditionally display bar and fum based on a toggle item on foo. Also, I want SSRS to collapse the columns for the currently-hidden items. So initially I see:

quote:
+foo baz


Then, if I click on the + beside foo, I see:

quote:
-foo bar fum baz


Can that be done in Report builder? If so, how?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-11-22 : 06:48:25
you can . The property is called toggle visibility based on report item
http://technet.microsoft.com/en-us/library/dd220405.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2013-11-22 : 11:39:34
quote:
Originally posted by visakh16

you can . The property is called toggle visibility based on report item
http://technet.microsoft.com/en-us/library/dd220405.aspx



Right, except it's not working for me. I created a column group for the columns bar and fum, then tried two things:

1. made the column group visibility conditional on foo
2. made the column itself conditional on foo

Either way, I get the message:

Toggle items must be textboxes that share the same scope as the hidden item or are in a scope that contains the hidden item , and cannot be contained within the current report item unless current grouping scope has a Parent.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-11-23 : 09:54:45
quote:
Originally posted by gbritton

quote:
Originally posted by visakh16

you can . The property is called toggle visibility based on report item
http://technet.microsoft.com/en-us/library/dd220405.aspx



Right, except it's not working for me. I created a column group for the columns bar and fum, then tried two things:

1. made the column group visibility conditional on foo
2. made the column itself conditional on foo

Either way, I get the message:

Toggle items must be textboxes that share the same scope as the hidden item or are in a scope that contains the hidden item , and cannot be contained within the current report item unless current grouping scope has a Parent.


why do you need separate group? if you want make it child group of foo

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2013-11-25 : 10:28:34
quote:
Originally posted by visakh16

quote:
Originally posted by gbritton

quote:
Originally posted by visakh16

you can . The property is called toggle visibility based on report item
http://technet.microsoft.com/en-us/library/dd220405.aspx



Right, except it's not working for me. I created a column group for the columns bar and fum, then tried two things:

1. made the column group visibility conditional on foo
2. made the column itself conditional on foo

Either way, I get the message:

Toggle items must be textboxes that share the same scope as the hidden item or are in a scope that contains the hidden item , and cannot be contained within the current report item unless current grouping scope has a Parent.


why do you need separate group? if you want make it child group of foo





I don't actually need a separate group. However, I found that Report Builder greys out the Column Visibility context menu item if the column is not a group. So, I was kinda forced to do that.
Go to Top of Page
   

- Advertisement -