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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"This Field" in a formula 1

Status
Not open for further replies.

Charliy

Programmer
Aug 12, 2008
601
US
Crystal XI
I'm doing a report with a lot of conditional formatting. I have threshold values and want my fields to change color based on where they fall. Is there some way to do a formatting formula that does not need the field name? I want to do something like:
IF <THIS FIELD> < {@LO THRESHOLD}
THEN CRGREEN
ELSE
IF <THIS FIELD> > {@HI THRESHOLD}
THEN CRRED
ELSE CRBLACK

I've looked thru help, but if the option is there it's under a name that is not obvious to me.
 
I think "CurrentFieldValue" is what you are looking for.

Code:
IF CurrentFieldValue < {@LO THRESHOLD}
THEN CRGREEN
ELSE
IF CurrentFieldValue > {@HI THRESHOLD}
THEN CRRED
ELSE CRBLACK

~Brian
 
CurrentFieldValue is not available in CR XI so if you aren't in the market to upgrade I believe you are stuck with the field name unfortunately

_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
Are you sure? I see it available in both v8.5 and v10. I don't have XI installed but I am pretty sure it is there.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
I stand corrected! Thanks for keeping me straight Ken. It absolutely is in CR XI

_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
That's exactly what I was looking for. I knew the feature had to exist, it's just a matter of figuring out what it's called. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top