Upravit

Sdílet prostřednictvím


Text boxes in paginated reports (Report Builder)

Applies to:  Microsoft Report Builder (SSRS)  Power BI Report Builder  Report Designer in SQL Server Data Tools

When you think of a text box, you probably think of a stand-alone box containing text on a surface like in Microsoft Office PowerPoint. In paginated reports, some text boxes are like that, and they can display static text for titles, descriptions, and labels, or dynamic text based on expressions. But every cell in a table or matrix (a tablix data region) also contains a text box, which you can format the same way you format stand-alone text boxes in your report.

Note

If you drag a report dataset field value directly to the report design surface, or to a text box on the report design surface, you only see the first value in the result set when you run the report. To see all the values for a field, you need to create a table, matrix, or list data region first, and drag the field to a cell in the data region. That way, when you run the report, you will see all the values in that field.

To show repeating text in a free-form layout, create a list data region and place the text box in it. Use a list when you want to repeat a form for multiple values, for example, a customer invoice form repeated once for each customer. Read more about creating invoices and forms with lists.

Use a rectangle container when you want to control the text box layout and white space below the last text box. For more information, see Rectangles and Lines (Report Builder and SSRS).

The expressions in a text box can contain literal text, point to a field in the database, or calculate data. All expressions are shown as placeholder text so that you can format numbers, colors, and other appearance properties. You can also combine placeholders with literal text in the same text box.

You can format text in any single text box with multiple fonts, colors, styles, and actions. For more information, see Formatting Text and Placeholders (Report Builder and SSRS).

Note

You can create and modify paginated report definition (.rdl) files in Microsoft Report Builder, Power BI Report Builder, and in Report Designer in SQL Server Data Tools.

Growing and Shrinking a Text Box

By default, text boxes are a fixed size. You can allow a text box to shrink or expand vertically based on its contents. For more information, see Allow a Text Box to Grow or Shrink (Report Builder and SSRS).

Rotating a Text Box

Rotating text boxes can help you create more readable reports, support locale-specific text orientation, fit more columns on a printed report that has fixed page size, and create reports with more graphical appeal. A text box can be rotated in different directions: horizontal, vertical (rotated 90 degrees), or rotated by 270 degrees. The vertical option is most commonly used for East Asian languages that are written top to bottom. In most renderers the vertical option handles the glyph rotation properly so that the text is written top to bottom, but the characters are not on their sides. For other languages, in the vertical and 270-degree options the text is written sideways.

You can rotate text boxes that contain static text, fields from a report dataset, or calculated data. The text box can be stand-alone in the report body, in a table or matrix, or in a report header and footer.

The following picture shows three versions of a table report that groups data by month. The text box that contains the month value uses a different text box orientation.

rs_TextBoxOrientation

Orientation is set on the text box and applies to all the text in the box. You cannot specify a different orientation for parts of the text box.

To get started, see the section on rotating text in the Tutorial: Format Text (Report Builder), and see Set Text Box Orientation (Report Builder and SSRS).

How-To Topics

Add, Move, or Delete a Text Box (Report Builder and SSRS)

Format Text in a Text Box (Report Builder and SSRS)

Set Text Box Orientation (Report Builder and SSRS)

Allow a Text Box to Grow or Shrink (Report Builder and SSRS)