I have created a Table within SQL Server Report Builder, and the first field is a calculated field with the following code:
=Code.ChangeWord(Fields!NAME.Value)
Where the function is
Public Function ChangeWord(ByVal s As String) As String
Dim strBuilder As New System.Text.StringBuilder(s)
If s.Contains("ESI ") Then
strBuilder.Replace(s,"ESI")
Return strBuilder.ToString()
Else : Return s
End If
End Function
Now, when I execute this, it works beautifully ... except that the Grouping mechanism doesn't group all instances of "ESI" together, like I want it to.
How do I change this behavior so that it groups all instances of "ESI" together, like it should?