The SSRS Str function is a Conversion function that will return the string representation of a given numeric field or number. The syntax of the Str function for returning the string representing a number is as shown below.
Str(Fields!Income.Value)
To demonstrate the Str function in reporting services, we use the Employee table below, which has 20 records. The image shows the records in the Table report.
SSRS Str function Example
For this, let me add a new column to the right side of the Sales column. Next, right-click the textbox under the String Sales and choose the Expression to open the expression window shown below. The Str expression below will return the string representation of the SalesAmount column.
=Str(Fields!SalesAmount.Value)
Similarly, let me create two more new columns to return the string representing numbers in the YearlyIncome and OrderQuantity columns. The SSRS Str function expressions to perform the same are shown below.
=Str(Fields!YearlyIncome.Value) =Str(Fields!OrderQuantity.Value)
Please click the preview tab to see the Str report.