I am using the below code to dynamically change the text, but I also need to change the color from black to red of the entire row in SSRS, using VB.NET. However, row.Cells.Style.ForeColor = System.Drawing.Color.Red does not work. Any ideas on how to dynamically change text color in a particular row?
Public Shared Function ChangeWord(ByVal s As String) As String
Dim strBuilder As New System.Text.StringBuilder(s)
If s.Contains("Others") Then
strBuilder.Replace("Others", "Others FIG NOT INCL")
Return strBuilder.ToString()
Else : Return s
End If
End Function
Public Shared Function ExcludeOthers(ByVal rowDesc As String, ByVal rowVal As Integer) As Integer
If rowDesc.Contains("Others") Then
rowVal = 0
Return rowVal
Else
Return rowVal
End If
End Function