Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional formatting of background color in field 2

Status
Not open for further replies.

AIMS

Technical User
Jan 16, 2003
20
0
0
US
I have searched through all the postings and didn't find one that matched my problem. We generate patient slide labels and would like to add a background color to a specific field. The ones we want to highlight all have trans L-1, trans L-2, etc. The formula I tried is;

if {stpuw_slide_labels.procedure_label_desc} like 'Trans%' then crSilver

In design mode the field shows shading, but in preview mode or printing it does not. What am I missing? I'm using CR 8.5.
 
Is it "trans" or "Trans"?

In any case, use * instead of % as a wild card for any number of characters.

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks for the quick reply, it works but the field is all black?
 
It is black because you did not supply an "else".


if {stpuw_slide_labels.procedure_label_desc} like 'Trans8' then crSilver wlse defaultattribute

I used defaultattribute instead of white or nocolor in the off chance that the default colors have been changed for the fields.

Mike
 
Totally awesome, thanks mbarron.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top