Developing Matt

My Technical Journal

Expand all items

leave a comment »

I like to give the user a way to expand all the items in a report.  In other words, I collapse all the items in a table for a clean looking report and let them expand each individual item.  But the next question is always, ‘what if i want to expand them all?’

The solution is to create a parameter and affectionately name it something like ‘expandallitems’ with the prompt saying ‘expand all items?’  Make it a drop down parameter with a yes or a no and set the values equal to 1 and 0.  (no = 0 obviously).

In your visibility…. HIDDEN property you can set it to an expression .  It has to result in a true or false expression so set it to Parameters!expandallitems.value <1. 

expandall

When they select no then this expression result will be true and it will hide the item.  When they select Yes the expression will return false and your item will not be hidden.  In a report I set all the hidden properties to this expression which enables them to show or hide all the hidden items at once. 

The only problem is that the initial value of the +- symbol is always a plus when normally it is a minus (or vice versa?  heck I don’t remember), so this might be confusing to the users.  How to change that is not possible  (i.e. not worth the development time to do it)

Advertisements

Written by matt

February 20, 2009 at 9:44 am

Posted in Report Services

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: