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

Regional Grouping in Report

Status
Not open for further replies.

gc6294

IS-IT--Management
Feb 23, 2004
56
US
I'm looking for the best way to format a formula in Crystal.

Would like to say something like this

if @STATE_COUNTRY='France' or 'Germany' or 'Hungary' etc... Then 'Europe'
if @STATE_COUNTRY='JAPAN' or 'China' etc then 'Asia'

What's the best way to format a formula like this - I seem to get syntax errors....
 
Try:

if @STATE_COUNTRY in ["France","Germany","Hungary"] then "Europe"
else
if @STATE_COUNTRY in ["Japan","China"] then
"Asia"
...etc...
else
"Unknown"

Use a final catch all as well as in my unknown example.

Also you are referencingna formula (@STATE_COUNTRY), we don't know what's in that formula, use the database field directly, or include what's in that formula field in your post.

If it still fails, post the formula you tried, and the exact error.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top