Glossary Item Box
The TextBox is the most basic report item that can display data in a report. It is the default report item that fills each cell of a table or matrix data region, and it is the report item that is created when you drag a field from the Data Explorer onto the report.
In the Value property of the TextBox, you can enter static text or an expression. An expression can display fields from a database, or calculate a value, or visually display data. See the Expressions topic for more information.
![]() |
Tip: You can enter text directly into the TextBox on the design surface of the report by double-clicking inside it. |
You will notice in the property grid an abundance of properties that you can use to control the appearance and behavior of this report item. For example, under the subheading Misc, you can set the Action property to cause the report to jump to another report, a bookmark, or a URL when the TextBox is clicked at run time. The DataElement properties under the subheading Data allow you to control how and whether the data in the report item is displayed in XML exports.
Under the subheading Layout are properties that control where, when and whether the report item displays. You can use the RepeatWith property to specify a data region with which the TextBox should repeat when that data region spans multiple pages. The HideDuplicates property allows you to specify a grouping or dataset within which to hide the TextBox when its value equals the value of the same item in the previous row.
By default, a TextBox can grow vertically to accommodate the data it displays, and cannot shrink smaller than it appears at design time. To change this behavior, set the CanShrink and CanGrow properties in the property grid.
When you drag a field from a dataset in the Data Explorer onto the report surface, a TextBox report item with an expression is automatically created. The type of expression that is created depends upon the context where you drop the field. The following table describes the various contexts and expressions created if you drag a field named SalesAmount onto the report.
![]() |
Note: The expression created is different for a field with a string or unknown data type. In these cases, the First aggregate is used in place of the Sum aggregate in the expressions below. At run time, the first value found within the scope is displayed instead of a summary. |
| Context | Expression | Run-Time Behavior |
|---|---|---|
| Directly on the report surface | =Sum(Fields!SalesAmount.Value) | Displays a summary of the sales amount for the entire dataset. |
| List data region | =Fields!SalesAmount.Value | Displays a value for each row of data, in a list running down the page. |
| BandedList data region, header or footer band | =Sum(Fields!SalesAmount.Value) | Displays a summary of the sales amount for the dataset associated with the BandedList. |
| BandedList data region, detail band | =Fields!SalesAmount.Value | Displays a value for each row of data, in a list running down the page. |
| BandedList data region, group header or footer band | =Sum(Fields!SalesAmount.Value) | Displays a summary of the sales amount for the grouping. |
| Table data region, header or footer row | =Sum(Fields!SalesAmount.Value) | Displays a summary of the sales amount for the dataset associated with the Table. |
| Table data region, detail row | =Fields!SalesAmount.Value | Displays a value for each row of data, in a list running down the page. |
| Table data region, group header or footer row | =Sum(Fields!SalesAmount.Value) | Displays a summary of the sales amount for the grouping. |
| Matrix data region, corner cell | =Sum(Fields!SalesAmount.Value) | Displays a summary of the sales amount for the dataset associated with the Matrix. |
| Matrix data region, column header cell | =Fields!SalesAmount.Value | Displays the value at the top of a new column for each row of data running to the right. |
| Matrix data region, row header cell | =Fields!SalesAmount.Value | Displays the value to the left of a new row for each row of data running down the page. |
| Matrix data region, detail cell | =Sum(Fields!SalesAmount.Value) | Displays a summary of the sales amount for the intersection of the column and row. |
| See Also |
TextBox Report Item Smart Panels | Field Selection Adorner
Reference: Report Appearance | Text Formatting
Copyright © 2006-2008 Data Dynamics, Ltd. All Rights Reserved.