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!

Exceptions Report

Status
Not open for further replies.

CTLReporting

Technical User
Jul 17, 2003
17
US
Hi all,

I am making a report that prints the records in one table that do not have an associated table in another table.

Does anyone have any idea how to do this?

Table1 has 6 fiels in common with Table2.

I think this would be easy in the way that I link these two tables. I don't care what information is printed in the report, I just want each record not in common and the total number not in common.

I have no idea where to start, and do not have much information to provide you guys with.

Sorry for so little info, but any help would be appreciated. Thank you.


CTL Reports Group,
Running Crystal Reports 8.0 and 8.5
Bentonville, AR
FoodLabReports@ctlusa.net
 
Lfft join the table you want rows returned for to the other table.

Go into the record selection and add in a check for null on the other tables joinmed field, as in:

isnull({Orders.Customer ID})

Here's the SQL it would generate using the Northwind Example database:

SELECT
Customer.`Customer ID`, Customer.`Customer Credit ID`,
Orders.`Customer ID`
FROM
`Customer` Customer LEFT OUTER JOIN `Orders` Orders ON
Customer.`Customer ID` = Orders.`Customer ID`
WHERE
Orders.`Customer ID` IS NULL

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top