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
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 ReportItems Font Color

Author  Topic 

tech2
Yak Posting Veteran

51 Posts

Posted - 2015-01-19 : 15:46:25
Hi,
I'm trying to create an expression that will change the Date to Red if the Date is 'less than' or 'equal' too 'today'

=IIF(Me.Value <= NOW(),"Red","Black") - Not Working

ReportItems![Textbox35].Value - I tried using this as well.

Thanks for your help!

viggneshwar
Yak Posting Veteran

86 Posts

Posted - 2015-01-21 : 04:20:26
Try this once =SWITCH(Me.Value <= NOW(), "Red", Me.Value > NOW(), "Black")

Regards
Viggneshwar A
Go to Top of Page

tech2
Yak Posting Veteran

51 Posts

Posted - 2015-01-22 : 11:09:23
Hi Viggneshwar

Thanks for your reply, Unfortunately, this didn't work.

I will keep trying until I figure it out and I will post here.

I'm thinking that it is probably going to take custom code.

Thanks again,
Go to Top of Page

viggneshwar
Yak Posting Veteran

86 Posts

Posted - 2015-01-28 : 03:28:11
Sure... Please reply if you got any solution for this


Regards
Viggneshwar A
Go to Top of Page

tech2
Yak Posting Veteran

51 Posts

Posted - 2015-01-28 : 09:59:35
Hi viggneshwar,

I went to plan 'B'.

I created another column in my query that shows the Status of the Due Dates.

case when PODetailInv.DueDate <= GETDATE() then 'LATE' else 'PENDING' end as PastDue
Go to Top of Page
   

- Advertisement -