Make hidden table column take no space in SSRS 2008 R2

ErikE picture ErikE · May 19, 2011 · Viewed 41.7k times · Source

Has anyone figured out a good way to make a hidden table/matrix column take no horizontal space?

I could use some crazy conditionals to dynamically determine the contents of the columns (effectively sliding them leftward as far as possible), but that is nasty, plus doesn't allow for varying column widths in the columns to the right of the one I want to hide.

The idea is that when a parameter is set to "Any" then the column with the corresponding value should display. But when the parameter is set to an explicit single value the report doesn't need to contain that column any more (it will be separately listed as a condition at the top of the report).

This lets me use the same report in different situations, some requiring hiding unnecessary columns.

P.S. I think Microsoft should add expressions for object sizes, and I think they should add CanShrinkHorizontally to the CanShrink(Vertically) that already exists...

Answer

ron picture ron · Jun 21, 2011

I think you are looking at the Hidden property of the column. Something that is hidden will still take up space. What you want to change is the Visibility of the column. Right click on the column header and click Column Visibility and set it there.