June 23, 2010 at 11:56 am
I have this function
dt1,dt2 are 2 dates which r coming as string
if dt2,today's date diff>6 months then Red else dt2 is null then check with dt1,today's date diff>6 months then Red
Public Function GetColor(ByVal dt1,ByVal dt2) As String
IF DateDiff(DateInterval.Month,Date.Now, CDate(dt2) ) >=6 Then
Return "Red"
Else IF isDBNull(CDate(dt2)) AndAlso DateDiff(DateInterval.Month,CDate(dt1), Date.Now ) >=6 Then
Return "Red"
Else
Return "Black"
END IF
End Function
=code.GetColor(Fields!ActsDate.Value,Fields!DecisionDate.Value)
Please help me..
thanks in advance
June 23, 2010 at 2:34 pm
I assume you're talking about doing this in Reporting Services.
Click on the detail row. On the far left, just to the left of the report, right-click on the box beside the detail row and select properties. Set the "BackgroundColor" to this expression, and that's it.
Here's a link to some good examples.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply