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!

Help with IF THEN statement 1

Status
Not open for further replies.

mchambers

MIS
Aug 28, 2008
56
US
Hello,


I am trying to write a report that shows for example:

If a client ordered a bike then list all orders for that customer. Can someone help me with this? Thanks
 
What you'll need is two copies of your orders table. When you try to add a table a second time, Crystal will ask you if you want to alias it and then it will add it with "_1" at the end of the table name. Then do something like the following (I'll call the tables orders and orders_1 in my example):

1. Link from orders to orders_1 on the customer id.
2. In the Select Expert, add your filter on item type for the orders table.
3. In the details of your report, put the data from the orders_1 table.
4. If users can select more than one item type - for example, Bikes and Helmets - go to the database menu and turn on "Select Distinct Records".

This should at least get you close to what you're looking for.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top