SSRS - Setting Table Row Height

心已入冬 提交于 2019-12-13 12:24:41

问题


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?


回答1:


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!




回答2:


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.




回答3:


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.




回答4:


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.




回答5:


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.



来源:https://stackoverflow.com/questions/2386857/ssrs-setting-table-row-height

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!