views:

239

answers:

3

Hi,

I am wondering how the row heights in an SSRS tablix are calculated.

For instance, I have data for which the displayed and grouped by columns are close enough to be identical. However, some rows will for some unknown reason have a massive height with a lot of blank space. If you inspect the HTML output you can see that these rows have a rowspan and height applied to them.

This is not a wrapping issue as I can do an IIf on that row's item id and simply display "a" instead of the actual values and still get abnormal height. I have also disabled CanGrow on all textboxes/rows etc. and have set manual heights yet the issue persists.

What causes this behaviour and how are the row heights usually calculated?

+1  A: 

One thing to check is the datatype. Older datatypes have padding added to them. Newer (varchar, nvarchar, etc.) would be better, if that's what's happening.

dave
They're all varchars but only one of the varchars columns causes padding. Still appreciate your help though so thanks!
Graphain
+1  A: 

Try setting the following properties for your rows and see if it helps.

  • Padding: 2pt, 2pt, 0pt, 0pt
  • VerticalAlign: Middle
  • CanGrow: False
  • CanShrink: False
Joe Stefanelli
Thanks I tried those (it appears to be a common answer) but no luck. Still appreciated nonetheless.
Graphain
+3  A: 

There are a couple of possibilities as to what is going on:

  1. SQL Server 2008 (fully patched) has a bug in that padding can sometimes be added for certain datatypes. Take a look at this page for more details. The link isn't covering exactly your issue but a support person from Microsoft does claim it to be a bug and very likely extends to your issue, as well. Supposedly, upgrading to SQL Server 2008 R2 resolves the issue.
  2. Assuming that you aren't going to upgrade SQL Server, there are a couple of things for you to check:
    • Make sure that the row height is not set to a height smaller than the default. keep the height at least as large as the default.
    • Adjusting the padding settings so that the top and bottom padding is set to zero (as others have mentioned) to Padding: 2,2, 0, 0
    • Take a look at this page for a more in-depth description. The article is a few years old but the information likely still applies.
Alison
Yes. I've seen the same bug which is what I based my earlier answer on.
Joe Stefanelli
This is the most comprehensive answer here. It should hopefully help others. I have found that after recreating a lot of the tablix and changing the grouping nature it *appears* to be gone (though the data may be different). However, I'm still not sure why and the rdl doesn't seem to reveal anything key. The proposed solutions were all appreciated though.
Graphain