Thursday, February 26, 2015

Background colour expression brings up a surprising result













I have a report where I want a cell colour to change if a duplicate value appears. I have used this expression for Background Colour:


IIF(Previous(Fields!CustomerSurname.Value) = Fields!CustomerSurname.Value, "Red", Fields!CustomerSurname.Value)


This works fine but if the customer surname is 'Brown' or 'Grey' then the cell colour matches the colour of the surname, eg the surname 'Brown' creates a brown cell background, not red. This doesn't happen with other surnames, eg ones that are not the names of colours...


Any tips / guidance on how to avoid this would be appreciated - thanks.





No comments:

Post a Comment