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

PLEASE HELP!! Grouping based on a parameter value

Status
Not open for further replies.

YA

Programmer
Aug 13, 2001
37
US
Hello

I am developing a report in CR8.5 to show all orders created for companies by region. I created a paramter field called "Region" and created 4 default values.(All, North America, EMEA, and Japan)

The tricky part is the "Region". I have to use {COMPANY.BILLING_COUNTRY} to decide which region the company belongs to and show the company orders if the region is selected in the parameter.

I think I have to define which country should belong to which region somewhere..

What would be the best way to deal with this?

Thanks!
 
You could create a formula {@Region}:

if {COMPANY.BILLING_COUNTRY} in ["Canada","USA","Mexico"] then "North America" else
if {COMPANY.BILLING_COUNTRY} in ["Abcd","Efgh"] then "EMEA" else
if {COMPANY.BILLING_COUNTRY} = "Japan" then {COMPANY.BILLING_COUNTRY} else
"Other"

Then in your record select you could use something like:

if {?Region} <> &quot;All&quot; then
{?Region} = {@Region} else
if {?Region} = &quot;All&quot; then true

-LB
 
Hi LB!

Thanks for your help. It worked great!

YA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top