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 2008 Forums
 Analysis Server and Reporting Services (2008)
 'IF' statement for Font Color

Author  Topic 

tech2
Yak Posting Veteran

51 Posts

Posted - 2014-01-15 : 13:16:15
Trying to use the expression below to change font to 'Red' when the text ends with a 'U'.

=IIf(Fields!ItemNumber.Value.ToString().Contains("*U"),"Red","Black")

The Report displays but the expression doesn't change any of the text items to Red.

Any help would be highly appreciated.

Report Builder 3.0 R2, SSRS 2008

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-01-16 : 05:22:08
=IIf(Right(Fields!ItemNumber.Value,1) = "U","Red","Black")



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

tech2
Yak Posting Veteran

51 Posts

Posted - 2014-01-16 : 12:57:56
Thanks! It works perfect!


quote:
Originally posted by visakh16

=IIf(Right(Fields!ItemNumber.Value,1) = "U","Red","Black")



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs


Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-01-16 : 14:08:21
Cheers!

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -