Hi All,
I am trying to get this code to work in reporting services 2003:
=switch(
DateDiff("d", fields!WARRANTY_EXP!value,now()) > 765, "White",
DateDiff("d", fields!WARRANTY_EXP!value,now()) > 365, "Yellow",
DateDiff("d", fields!WARRANTY_EXP!value,now()) > 0, "Red",
DateDiff("d", fields!WARRANTY_EXP!value,now()) < 0, "Gray"
)
I'm trying to code a field so that if the date field is in the past it changes the background colour to grey, if it's going to be in the next year then red, and in the next 1-2 years yellow. Everything else white.
I've tried rearranging it but the coding must be wrong somewhere as greater than 2 years is grey, dates in the past are yellow and next year is red :-S
Many thanks,
Pierce