CBlog(handziuk)

Bradley Handziuk's blog

Variable Column Width in SSRS Matrix Report

If you have a tablix/matrix/cross tab report in SSRS you'd think making variable column widths would be easier because there are variable data in each column by design. Not so. Setting CanGrow = true on the textboxes which constitute the column doesn't make the width change, it only affects the height and then only if you have word wrap on it seems.

The work-around is to make a dummy column which can be toggled on or off depending on if you want a wide or skinny column. This process lets you have as many set column widths as you have dummy columns. It will not let you have 100% dynamic widths.

When you have your dummy columns inserted merge all the cells together so they are all treated as one still but they span multiple columns.

Once merged it should look like this

Now you have two columns; the left column will always stay on and the right column can be switched off if you need a narrower column.

Remember that whatever expression you use to set the visibility must evaluate to True or False where True = Visible and False = Hidden.

Loading