Getting a column to change colour by using an expression

  • Hi

    I have a date column that I want to change colour if the date is older than 28 days from the date that the report is being run on. In Sql I would us getdate() to pick up the current date, what do you use in RS 2000?

    Thanks

    Tracy

  • Not sure if this will help or not, but in SSRS 2005 I would use an expression for the color of that column and set the expression equal to...

    Iif(datediff(

    "d",Parameters!Date.Value,now())>28,"#000000","#FFFFFF")

    That works in 2005, but you'd have to try it in 2000.  Let me know how it works out for ya.

     

  • Hi

    I put the expression that you gave me into the expression for colour, is this the right place to put it?

    The reason I ask if this was the right place is that nothing happened.

  • The expression should be in the color property for the column, I was under the impression that RS uses aliases, like "Blue", "Red", "Green" for colors instead of HTML colors.

    Try:

    Iif(datediff("d",Parameters!Date.Value,now())>28,"Red","Blue")

    Good Luck!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply