Reputation: 537
I have a simple table in a SSRS report. I am using SQL Server 2008R2. I have an indicator on one of the fields. I need to know if the date in the field is there or not. If the user has put a date in the field, I need a green indicator, if not I need the indicator to be red. Basically an on or off functionality. I have tried to use =IsDate(Fields!ImportDate.Value)
as the fx for the indicator but no luck. Anyone have a good tutorial on indicators that includes date related fields?
Upvotes: 0
Views: 933
Reputation: 11105
I usually use IsNothing
to verified if a date is valid or not, before formatting it; i.e.:
=IIf(Not IsNothing(Fields!YourDate.Value), FormatDateTime(Fields!YourDate.Value), "")
In your case you can use IsNothing
like this:
=IIf(Not IsNothing(Fields!ImportDate.Value), "Green!", "Red!")
Upvotes: 2
Reputation: 15155
Try this...
=IIF(IsNothing(Fields!DateField.Value),"Red","Green")
Upvotes: 1