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 2005 Forums
 Analysis Server and Reporting Services (2005)
 Conditional Formatting

Author  Topic 

dlwilson007
Starting Member

5 Posts

Posted - 2007-01-25 : 11:43:34
I want to write an expression that will evaluate 2 fields. So, in simple terms, I want the following:

if field1 > 0 and field2 = "yes", apply formatting, otherwise leave formatting as is.

I am familiar with using iif statements, but since I want to evaluate 2 fields instead of one, I'm not sure how to proceed.

It seems I may need to use another statement, such as the Switch statement...I just don't know how.

Thanks for any help!
David

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-01-25 : 11:55:56
No, just an IIf will be fine, basically just
=IIf(field1 > 0 AND field2 = "yes", "true result", "false result")

You can use that in the expression of multiple properties on multiple text boxes.
Go to Top of Page

dlwilson007
Starting Member

5 Posts

Posted - 2007-01-25 : 12:57:15
quote:
Originally posted by snSQL

No, just an IIf will be fine, basically just
=IIf(field1 > 0 AND field2 = "yes", "true result", "false result")

You can use that in the expression of multiple properties on multiple text boxes.



Thank you. I tried that and failed, but obviously it was the way I wrote the expression that was wrong, and not the method. Thanks for your help!
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-01-25 : 14:09:18
If you post your code and the error you got, someone here will no doubt be able to help.
Go to Top of Page
   

- Advertisement -