Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Backround Colour based on Lookup value help

Author  Topic 

02119
Starting Member

8 Posts

Posted - 2013-01-18 : 07:06:45
Hi,
I have a table displaying dates from 2 different datasets, this works great

but I need the backround of the columns to change depending on the date value. This is my query

=IIF(DateDiff("d", Lookup(Fields!BrigID.Value,Fields!BrigID.Value,Fields!flddDRIVTrainDate.Value, "Base1Shared"), Now())>1095,"Red","no color")

So if the date value is more than 3 years old from when the report is run the backround goes red and I know that one of the staff needs to complete a course.

The trouble is that this code works but also seems to remove the text colour as well

Any help would be greatful

02119
Starting Member

8 Posts

Posted - 2013-01-18 : 07:08:41
Sorry Posted in the wrong forum

Doh
Go to Top of Page

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-01-18 : 07:19:58
If the expression is on the BackgroundColor field, then the text color should not change. Could it be that it is not visible because it is immersed in red? You might try adding another expression to the Color field to change it from black to white/no color.
Go to Top of Page
   

- Advertisement -