Format text in a text box in paginated reports (Report Builder)
Applies to: Microsoft Report Builder (SSRS) Power BI Report Builder Report Designer in SQL Server Data Tools
In paginated reports, you can format any part of the text in a text box independently, and mix placeholder text and static text in one text box. This ability to mix formats and add placeholder text enables you to create mail merges or templates for text in your paginated report. Any expression can be defined and formatted separately using a placeholder.
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.
Combine multiple formats in a text box
On the Insert tab, select Text Box. Select the design surface, and then drag to create a box that is the size you want.
Inside the text box, select the text you want to format.
Right-click the selected text, and select Text Properties.
Set formatting options. For example, on the General tab:
Tooltip Type text or an expression that evaluates to a ToolTip. The ToolTip appears when the user pauses the pointer over the item in a report
Markup type Select an option to indicate how the selected text will be rendered:
Plain Text Display the selected text as simple text. HTML will be treated as literal text.
HTML Display the selected text as HTML. If the expression value of the placeholder contains valid HTML tags, these tags will be rendered as HTML. For more information, see Importing HTML into a Report (Report Builder and SSRS).
Select OK.
Repeat steps 2 through 5 for the remaining text you want to format.
Format text and placeholders differently in the same text box
On the Insert tab, select List. Select the design surface, and then drag to create a box that is the size you want. The Dataset Properties dialog box opens. You can use a shared dataset or a dataset embedded in your report. For more information, select Dataset Properties Dialog Box, Query (Report Builder) or Dataset Properties Dialog Box, Query.
On the Insert tab, select Text Box. Select in the list, and then drag to create a box that is the size you want.
Type a label in the text box - for example, My Field.
Drag a field from your dataset into the text box. A placeholder is created for your field.
For basic formatting, select the placeholder text and then select one of the formatting options in the Font group on the Home tab. For example, select the Bold button.
For more formatting options, right-click the placeholder text, and then select Placeholder Properties.
Select OK. In report design view, the text box should contain "My Field: [FieldName]", where FieldName is the name of your field.
Select Run.
The list repeats one time for every value in the field, and the FieldName placeholder is replaced each time by the value of that field in the dataset.
Add Heading elements to a text box
On the Insert tab, select Text Box. Select the design surface, and then drag to create a box that is the size you want.
Inside the text box, select the text you want to format.
Right-click the selected text, and select Text Properties.
Set heading elements. For example, on the Accessibility tab:
- Accessibility options Overwrite the structural type to give the Texbox a different semantic meaning output format, like HTML and Accessible PDF.
- Overwrite structure type allows you to choose HTML heading elements H1-H6.
Make a selection.
Select OK.
Related content
- Text Boxes (Report Builder and SSRS)
- Formatting Text and Placeholders (Report Builder and SSRS)
- Expression Uses in Reports (Report Builder and SSRS)
- Expression Examples (Report Builder and SSRS)
- Add HTML into a Report (Report Builder and SSRS)
- Tables, Matrices, and Lists (Report Builder and SSRS)
- Formatting Numbers and Dates (Report Builder and SSRS)
- Placeholder Properties Dialog Box, General (Report Builder and SSRS)