Conditional formatting of text box

Posted on 2004-11-03
Medium Priority
Last Modified: 2008-03-17
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    
    Formula = 0 'False
End if

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

Looking forward to your replies! Thanks!
Question by:MariaHalt
  • 3
LVL 101

Accepted Solution

mlmcc earned 200 total points
ID: 12486551
You should be returning the color

If {ado.x} <> {ado.y} Then
    Formula = crSilver'True    
    Formula = crWhite 'False
End if


Author Comment

ID: 12486627
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.
LVL 101

Expert Comment

ID: 12489469
I hope I got the colors names close.

Glad I could help


Expert Comment

ID: 12853794
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
sTrue =false
end if
formula = sTrue

What's wrong?
LVL 101

Expert Comment

ID: 12864202
It is customary to ask your own questions.


Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month14 days, 10 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question