Sunday, November 25, 2012 4:23 PM
I have an existing report to which i had added couple of columns for a requirement. I had to hide these columns based on a column value Say 'Column1'. how can i acheive this in SSRS.
any help would be really appreciated
Regards Chaithu.. If it is usefull,Mark this as Answer.
Sunday, November 25, 2012 7:43 PM
You can use an expression in the visibility property of the column you want to hide. For example, if you want to hide Column A if ColumnB = '"ABC" then use the following expression in the visibility property of ColumnA.
=IIF(Fields!ColumnB.Value = "ABC", TRUE, FALSE)
Hope this helps!
Shahfaisal Muhammed http://shahfaisalmuhammed.blogspot.com
- Edited by Shahfaisal Muhammed Sunday, November 25, 2012 7:44 PM
- Proposed As Answer by Syed Qazafi AnjumMicrosoft Community Contributor, Moderator Sunday, November 25, 2012 11:12 PM
- Marked As Answer by Chaithanya Reddy Tuesday, November 27, 2012 4:20 AM
Monday, November 26, 2012 7:52 AMModerator
Add a visibility toggle when you want to enable a user to interactively show or hide report items or, for a table or matrix, rows and columns associated with a group. To toggle the visibility for an item, you set the visibility properties for the item that you want to show or hide. For more information about how to add a visibility toggle to an item, please see:
In you scenario, you want to hide columns base on another column’s value, right? As Shahfaisal said, you can use an expression like:
=IIF(Fields!Column1.Value = "ABC", TRUE, FALSE)
However, this expression can only get the first record value of column1, in another words, the column is hide or not only base on the first record value of column1. If you want to set the visibility of column base each of records, you can set the text-box visibility of this column.
If you have any questions, please feel free to ask.
TechNet Community Support