all groups > sql server reporting services > may 2006 >
You're in the

sql server reporting services

group:

Conditional Formatting on Datetime Field



Re: Conditional Formatting on Datetime Field Dan
5/10/2006 12:46:20 PM
sql server reporting services: Will something like this work for you?

=iif(Fields!EventDate.Value < dateadd("n", -10, Now()), "Red", "Black")

Regards,

Dan
Re: Conditional Formatting on Datetime Field Dan
5/10/2006 1:49:28 PM
Not a problem. Glad it worked.
Conditional Formatting on Datetime Field Pete Zerger
5/10/2006 6:47:10 PM

I am building a report with a query that includes a field of type datetime.
I would like to change the color of the text in this column to RED if the
value contained in the field is earlier than now() - 10 minutes. I would
appreciate direction as to the appropriate function to use in this scenario.
I have tried to work with datediff, but without positive results.

Regards,

Pete Zerger, MCSE(Messaging)
Co-founder and Webmaster, MOMReourcs.org
URL:http://www.momresources.org
mailto:pete.zerger@gmail.com

Re: Conditional Formatting on Datetime Field Pete Zerger
5/10/2006 7:57:21 PM
Hello Dan,

Close. This seems to return the word RED or BLACK in the target field rather
than just changing the color of the text.

Regards,

Pete Zerger, MCSE(Messaging)
Co-founder and Webmaster, MOMReourcs.org
URL:http://www.momresources.org
mailto:pete.zerger@gmail.com


[quoted text, click to view]

Re: Conditional Formatting on Datetime Field Pete Zerger
5/10/2006 8:05:25 PM
Hello Dan,

Pardon my ignorance Dan, I pasted this expression into the wrong field. This
in fact worked perfectly. Thanks so much for your assistance.

Regards,

Pete Zerger, MCSE(Messaging)
Co-founder and Webmaster, MOMReourcs.org
URL:http://www.momresources.org
mailto:pete.zerger@gmail.com


[quoted text, click to view]

AddThis Social Bookmark Button