views:

17

answers:

1

I'm working on a SQL Server Reporting Service report, that will eventually be in my WPF app. There are certain sections of the report which should only be shown, if certain conditions are met. How do I make sections appear or be hidden/collapsed in the Report Viewer? (I'm working in VS 2010.)

+1  A: 

It may depend on what you mean by "section". Most report objects (such as text boxes, table rows, etc.) have a property Visibility>Hidden which can be set to a condition, by selecting the <Expression...> option for the property in the Properties window in the Report Designer.

Mark Bannister
OK, will setting the Visibility>Hidden property cause it to collapse the area allocated to that field, on the report? Or will there be a space there, when the field is hidden?
Rod
@Rod, It depends on what you are hiding - if you conditionally hide a single field, that field will be blank, but if you conditionally hide an entire table *row*, that row should be omitted.
Mark Bannister
Thank you, Mark.
Rod