Link to home
Start Free TrialLog in
Avatar of MariaHalt
MariaHaltFlag for United States of America

asked on

Conditional formatting of text box

Hi Experts,

My problem is over a simple feature, this is embarassing to even seek help for...

I'm using Crystal Reports 8.5 on W2K OS.  When I conditionally format a text box background to silver, the entire text box background becomes black, even if the condition is not met!!!  I'm using Basic Syntax and the formula in the condition is:

If {ado.x} <> {ado.y} Then
    Formula = 1 'True    
Else
    Formula = 0 'False
End if

FYI:  Both {ado.x} and {ado.y} are not null fields.

Looking forward to your replies! Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

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 MariaHalt

ASKER

Really?  I didn't think to specify the color in the Formula since I had already chosen the color from the combo box.  I thought I was just looking for a True or False to the condition:  If true use chosen color, if false use default color.  Anyway, it works.  Thank you.
Avatar of Mike McCracken
Mike McCracken

I hope I got the colors names close.

Glad I could help

mlmcc
I was happy to see the color issue, but how does that apply to label suppression.
I'd like to suppress some fields/labels based on the parameter.

If the region is "RMAP", suppress the label.

dim sTrue as boolean
if {?sRegion} = "RMAP" then
sTrue =true
else
sTrue =false
end if
formula = sTrue

What's wrong?
thanks,
pchak
It is customary to ask your own questions.

mlmcc