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
 General SQL Server Forums
 New to SQL Server Programming
 IIF statement to change color

Author  Topic 

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-06-24 : 11:40:05
Hi,
Not sure what I did wrong to this code. What I would like this code to produce is, if any number is less than 0 (negative) than it should be red, if it's greater than 0, it should be black. Somehow it comes back red even though it's a positive number.


=iif(Fields!balance.Value < 0,"red","black")
1,106,666
472,169
-61,991
680,138
101,507
83,670
19,673
17,649
2,344,837

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-06-24 : 12:51:22
Are you trying to do this in Reports?
Post your question in Reporting Services Forum

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -