1
votes

In SSRS 2008, I am trying to add a group expression based on the data containing the word "HOLD". Here is what I have currently.

=IIF(Fields!NOTE.Value.ToLowerInvariant().Contains("HOLD"), "Z-HOLD", Fields!DROPZONE.Value)

This is not working. Any ideas on what I have done wrong would be appreciated?

1

1 Answers

2
votes

Simple mistake, you're converting the source string to a lower:

=IIF(Fields!NOTE.Value.ToLowerInvariant()

But then you're comparing it with an upper string:

.Contains("HOLD")

Try this:

=IIF(Fields!NOTE.Value.ToLowerInvariant().Contains("hold"), "Z-HOLD", Fields!DROPZONE.Value)