SSRS GetChar Function

The SSRS GetChar function is a Text function that will return the char or character at the given index position. The syntax of the SSRS GetChar function to find the char value at the specified index position in a string is as shown below.

=GetChar(Fields!FullName.Value, 5)

To demonstrate the SSRS GetChar function, we use the Employee table below, which has 15 records. The image shows the records in the Table report.

Source Table

SSRS GetChar function Example

For this, let me add a new column to the right side of the Name column. Next, right-click the textbox under the GC Name and choose the Expression. To understand the report, I suggest you refer to the articles on charts, tables, grouping, and format tables in SSRS.

Choose expression option

It opens the following expression window to find the character. The below SSRS GetChar function returns the character at the seventh index position in the Name (string) column. The index starts from 1 to N.

=GetChar(Fields!Name.Value, 7)
SSRS GetChar Function expression to get character 7th index position

Please click the preview tab to see the report.

SSRS GetChar Function Preview

Similarly, let me create one more new column to the right of the Email Address column. Next, right-click the textbox under it to write the expressions below. Here, the Len function returns the total number of characters and subtracts three from it. Next, the SSRS GetChar function returns the char value or character at the fourth position from the right of the Email column. For more functions >> Click Here!

=GetChar(Fields!Email_Adress.Value, Len(Fields!Email_Adress.Value) - 3)

Please check the report preview.

SSRS GetChar Function Preview to find the character at index position