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!

New item ordered

Status
Not open for further replies.

CMDorsey

Technical User
Oct 26, 2005
4
US
I am a Crystal Reports novice now having said that...

I need to create a report that that selects records from one table when they do not exist in another table -

When an ITEM exists in the SO_SalesOrderHistoryDetail table but not the SO_LastPurchaseHistory.

Any help would be greatly appreciated.

 
From A to B, use a 'Left Outer'. This means that you'll get a mix of As with Bs and As without Bs.

Now suppress detail lines when something existing for B.

Right-click on the field and choose Format Field. Choose the [Common] tab, and then the formula icon (x+2 and a pencil) for suppression. Enter a formula; e.g.
Code:
Not Isnull({TableB.field})

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Use a left outer join FROM SO_SalesOrderHistoryDetail TO
SO_LastPurchaseHistory, and then use a record selection formula like this:

isnull({SO_LastPurchaseHistory.linkingfield})

...where you replace the actual field name for the linking field from the history table.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top