SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Backround Colour based on Lookup value help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

02119
Starting Member

8 Posts

Posted - 01/18/2013 :  07:06:45  Show Profile  Reply with Quote
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 - 01/18/2013 :  07:08:41  Show Profile  Reply with Quote
Sorry Posted in the wrong forum

Doh
Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3760 Posts

Posted - 01/18/2013 :  07:19:58  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000