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

Crystal record selection problem

Status
Not open for further replies.

DunureCAB

IS-IT--Management
Oct 29, 2013
2
I have a Crystal report which is giving me a real problem.
I have two tables one is a customer master table and the other is an address file.
The structure of the address file has an address type I for invoice and D for delivery.
The key is the customer account code and the customer has a Invoice to address name and a deliver to address.
It is possible to have an invoice address only or an invoice address and a deliver to address.
The problem is that often the invoice and deliver to address names are the same.
When this happens the report doubles up.
I can get round this in the record selection by selecting address type I for the invoice and address type D for the deliver to.
Problem is if there is no Delivery address the second condition means nothing is selected and the print comes up blank!
 
Do a left join from the customer master table to the address table. In the Select Expert add "address1.address type = "I""

Then add the address table again, and left join from customer master to address2 table. In the Select Expert add "address2.addresstype = "D""

Then you can add the fields as if they come from two different tables.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top