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

having trouble selecting only one address per customer

Status
Not open for further replies.

martink1

IS-IT--Management
Jun 22, 2001
41
US
I have a Greatplains database of customers. all have a primary address. some also have a shipping address. I need to create a mailing list with only one address per customer. Using their primary address unless they have a shipping address, then I want to use the shiping address. Basically if they have a shipping address use that, if not, use the primary address. I can't figure out how to eliminate the primary address if the customers has a shipping address. the customer shows up twice using CR v10
Thanks for any help or point in the right direction
 
Write a series of formulas:

If Isnull({ShippingAddress}) then {PrimaryAddress} Else {ShippingAddress}

If Isnull({ShippingAddress}) then {PrimaryAddressCity} Else {ShippingAddressCity}

Etc., etc.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
I can't do that. every customer has address1, address2 etc. the primary and shipping address are differentiated by an addresscode. also tried if addresscode = "shipping" then true. if true then "shipping". if false then "primnary" stuff and also "if then else or" stuff. none will give me one address per customer. is the a way to make the customer ID be unique like a primary key and only occur once per report.
 
If you have a customer table and a shipping address table, how are they linked?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Why don't you Group the report by customer and then by address type in descending order so that the shipping will be first one, when you put the address details on the address group only one will show up, the shipping first and if that is missing the primary.

Mo
 
all the info is in one table (GreatPlains idea, not mine)
misc
cust id
cust name
addresscode
addr 1
addr 3
city
state
yada yada

I'll try the grouping idea from Mr Mo when I get to work.
 
slight change of plan, You will have to place the address on the Customer group and hide the Address Code Group.

the rest should be the same

Mo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top