Link to home
Start Free TrialLog in
Avatar of apitech
apitech

asked on

Conditional Formatting on a Formula in SQL Reporting Services 2008

Hello:

I have a field containing a formula.  I know that SQL Reporting Services offers conditional formatting, where you can have a field display as Red when the field is less than 0.  But, how do you do that when the field is a formula?

Here is the formula:

=Sum(iif(Fields!SOPTYPE.Value=4,
-Fields!XTNDPRCE.Value,
Fields!XTNDPRCE.Value))

This formual is a sum based ono a grouping.

I went into the Placeholder properties and then in the Font section and clicked the function button.  Then, I entered the following:

=iif(Sum(iif(Fields!SOPTYPE.Value=4,
-Fields!XTNDPRCE.Value,
Fields!XTNDPRCE.Value))) < 0, Red, Black

But,I got an error upon running the report with this.

How do you do this conditional formatting when there is a formula.  I know that this would work with a regular field.

Thanks!

Apitech
ASKER CERTIFIED SOLUTION
Avatar of Nico Bontenbal
Nico Bontenbal
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of apitech
apitech

ASKER

LOL!  I didn't think about the placement of the parentheses!

You're right, as usual!

Thank you, Nicobo, for getting me out of yet another debacle!!!

John
Avatar of apitech

ASKER

Nicobo is an asset to Experts Exchange!