Friday, March 11, 2011

Dynamically Hide columns in SQL server reporting services 2008 (SSRS)

Hey All,

I just discovered one hilarious thing in a pre-existing code written by someone some years ago.. OK, first the question : How to dynamically hide/show a coulumn in a Tablix in SQL server reporting services 2005/8 ?

Ok, I will give you a clue:

Option 1: Right click on the column, Select column properties, then choose column visibility, and select "Use expression", and then give the criteria to make it visible.



Option 2: Using .NET code, read the report's RDL XML, remove the column from the Tablix, make sure that the resultant XML is as per the RDL schema standards, and re-deploy the report in to SQL server, run the report, delete the report.


If you had chosen Option 1, then you know what I am talking about.. ha ha ha..

For those who had selected Option 2, sorry, no luck today :) Do a bit of research and you will understand why I am laughing [Can't control my laughter ... ha ha ha. again...]

No comments: