Reputation: 21657
I'm working in a SSRS report. I have a table in the report. How do I set the row height of the rows in the table?
Upvotes: 15
Views: 58685
Reputation: 787
From the Microsoft documentation Change Row Height or Column Width (Report Builder and SSRS):
Changing the height of one cell appears to affect the whole row. It worked for me.
Upvotes: 3
Reputation: 45
Since a tablix row doesn't have a dynamic height property (only CanGrow
and CanShrink
properties), I came up with a workaround.
You can use the length function LEN()
in the Value expression for a cell in the row you want more height and add whitespace to the bottom (or top) of the cell with <br/>
tags, thus effectively changing the row height dynamically.
To do this, first in the Placeholder Properties of the cell, change the markup type to "HTML - Interpret HTML tags as styles". (Just like changing the static row height property for a cell, this will change the height for the entire row.)
The "dynamic" whitespace you add to the bottom (or top) of the cell depends on how many <br/>
tags you append to the value. Here's an example to add whitespace to the row if the cell has a value length of 100 or more characters (increasing the whitespace for every additional 100 characters in length).
=IIF(LEN(Fields!myText.Value) < 100, Fields!myText.Value,
IIF(LEN(Fields!myText.Value) < 200, Fields!myText.Value + "<br/><br/>",
IIF(LEN(Fields!myText.Value) < 300, Fields!myText.Value + "<br/><br/><br/><br/>",
Fields!myText.Value + "<br/><br/><br/><br/><br/><br/>"))))))
Make sure the CanGrow
and CanShrink
properties are set according to your needs. (For the example above, CanGrow
is set to True.
Upvotes: 4
Reputation: 587
Select one cell in a row , go to properties, go to size, give width and height and dis-select "allow textbox height to increase" and "allow textbox height to decrease" in textbox properties. Then it will effect on whole row.
Upvotes: 9
Reputation: 1219
You can edit the RDL(C) and set it exactly using an XML editor.
Look for the following:
...
<TablixRows>
<TablixRow>
<Height>1.5in</Height>
...
Note that you must have set the row height before there will be a Height node.
Upvotes: 4
Reputation: 582
Select the row you want to change the height of. With that row selected bring up the properties pane (Alt+enter if you don't see it). Scroll down to the position group of properties and specify the width and height there. The "cangrow" and "canshrink" properties are useful too sometimes.
Hope that helps!
Upvotes: 26