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.
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.
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)
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 click the GetChar function preview tab to see the report.