开发者

SSRS - Setting Table Row Height

I'm working in a开发者_Go百科 SSRS report. I have a table in the report. How do I set the row height of the rows in the table?


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!


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.


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.


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.


From the Microsoft documentation Change Row Height or Column Width (Report Builder and SSRS):

  1. In Design view, click a cell in the table row.
  2. In the Properties pane that displays, modify the Height property, and then click anywhere outside the Properties pane.

Changing the height of one cell appears to affect the whole row. It worked for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜