Make hidden table column take no space in SSRS 2008 R2
Asked Answered
A

3

22

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...

Anthropo answered 19/5, 2011 at 17:41 Comment(0)
F
45

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.

Featherston answered 21/6, 2011 at 18:30 Comment(3)
Okay, that is extremely nasty. When you select a column, the Hidden property shows in the properties pane, but the Visibility property is separate accessed only by a right-click on the graphical element. Thanks. Can you also help with this question? The "Column Visibility" option is greyed out in the tablix (though I've upgraded the report to SSRS 2008 by now).Anthropo
Matrix is also grayed out if that column is not part of a group. What I did is create a dummy group for the column. Right-click, insert column, "Adjacent before" any actual groups you want..Subdued
As said, you right click in that "space above" where you'd otherwise use for selecting the whole column, and then column visibility is an option in that context menu. (You can set it to something like "SomeColumnName.IsMissing" , if that column doesn't always display in the result set... so you can have a table that works with 2+ different queries, and that just hides columns that aren't relevant)Sf
D
8

It looks like you can hide groups, and groups can be rows or columns.

Click the down-arrow next to "Column Groups" at the bottom of the Design pane, and turn on Advanced Mode. Modify the Hidden property of the Static group representing the desired column. Poof! You've made the entire column take up no space.

Decosta answered 27/5, 2011 at 2:21 Comment(1)
it turns out that setting the Visibility property of the column is possible, which seems to me to be the "right" way.Anthropo
M
1

I struggled with this and came up with a workaround/solution.

In my scenario it was critical to have the RowGroups EffectiveDate, Description AND TransactionID. I wanted to hide the TransactionID column, because it was part of the grouping I couldn't set the Columns Visibility.

Before

enter image description here

After

So what I did was Merge Cells for the Description/TransactionID Header (and called it Transaction Type) and also for the first row of the tablix "Opening Balance".

Set the TransactionID textbox Hidden: True

The trick was to make the [DESCRIPTION] Right BorderStyle: None

enter image description here

Then set the Cell under [TRANSACTIONID] Top BorderStyle: Solid and Top BorderWidth 0.5

enter image description here

Alternatively make the fore color of the column you want to hide white and set border styles appropriately.

Moisesmoishe answered 17/6, 2016 at 6:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.