Adding a Text Box
A text box is a report item that contains an expression. This expression can contain static text, point to a field in the database, or calculate data.
To view instructions about working with text boxes, see:
- How to: Add, Move, or Delete a Text Box (Report Designer)
- How to: Add an Expression (Report Designer)
The following table provides examples of expressions that you can use in a text box. For static text, you can also simply enter the text directly into the text box using no expression (no equal sign or quotes.)
Expression | Description |
---|---|
|
Displays a static text label. |
|
Displays the value of the UnitCost field. |
|
Multiplies the value of the TotalUnits field and the UnitCost field and displays the result. |
|
Calculates the sum of the TotalUnits field across all rows in the group. |
Growing and Shrinking a Text Box
By default, text boxes are a static size. If you want to expand a text box vertically based on its contents, change the CanGrow property for the text box. If you want to allow the text box to shrink based on its contents, change the CanShrink property for the text box. You can access these properties through the Properties window or through the Textbox Properties dialog box.
See Also
Concepts
Working With Fields in a Report Dataset
Other Resources
Using Expressions in Reporting Services
Textbox Properties (General Tab, Report Designer)