Textbox Report Item


Textbox displays all text, including textual representation of numeric data on the report. A standalone text box should always be used to display a single expression. The name of a report is an example of such an expression. The expression in this case is a constant string.

An individual text box can be placed anywhere on a report and can include almost any expression. However, expressions that will work in a text box can be limited by a container. For example, a report's page footer does not allow the Fields collection and, thus, expressions that use the Fields collection cannot be used within a text box located in the page footer.

If the data set associated with a report contains multiple rows and the following expression is used, only the last value is displayed. For example, the following expression will display the last product name in the data set:

 =Fields!ProductName.Value 

Aggregate functions, such as First , Maximum , Minimum , and Average , can be used to access other values. More information about aggregate functions can be found in Chapter 12. In addition, conditional functions can be used to display a value matching a certain condition. However, default SSRS functionality does not allow you to access the data set's fields by index.

Textbox is denoted by the <Textbox> tag and in a simple case has the following RDL:

 <Textbox Name="textbox1">      {POSITION}      <Value>=Fields!ProductName.Value</Value>   </Textbox> 

The <Value> tag needs to be present for a text box's RDL to be valid; it can also be empty, such as <Value /> or <Value></Value> .



Microsoft SQL Server 2005 Reporting Services
Microsoft SQL Server 2005 Reporting Services
ISBN: 0672327996
EAN: 2147483647
Year: 2004
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net