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

two joint table; left table has some data not exist

Status
Not open for further replies.

dashagua

Technical User
May 1, 2009
9
CA
I have two tables "Order_Master" and "PO_Code". They are linked by "PO#" in both tables.
PurchasePrice is saved in "Order_master" table.
Currency field is saved in "PO_Code" table.
Mnufacture is in another table "MFG_Part_Master" linked with "Order_Master" by "Manufacurer#" in both tables.)

I need to get a report like this:
Manufacture PurchasePrice Currency
M11 10.00 CA$
M12
M13 25.00 US$

Now some of PurchasePrice does not exist, then I want Currency shows nothing. But now after I linked these three tables and run the report, the crystal report just failed and quit. Anyone know what shall I do to make it work? Thanks.
 
Hi,
How are you joining the tables - Which to Which and in what order by what fields?

Check the event log on the PC running the report to see if any errors were reported.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Excuse me for this late reply.
Actually the report is looking up 3 tables "MFG_Part_Master","Order_Master" and "PO_Code".

"MFG_Part_Master" and "Order_Master" table linked by "Manufacurer#" field by " Left out join". So even if a manufacurer# has no PurchasePrice in "Order_Master", "Manafacture" can still appear in the report.

"Order_Master" and "PO_Code" tables are linked by "PO#" field by "Inner Join" which I think is not correct. Because when M12's Purchase price not exist, means PO# in both"Order_Master" and "PO_Code" tabel are not exist, then how can I tell crystal to show nothing "blank" and go on with next record?

Manufacture PurchasePrice Currency
M11 10.00 CA$
M12
M13 25.00 US$

 
You need a left outer join also for the order master->PO code table. In fact, once you have used a left join, any tables to the right of that join must also be left joined.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top