Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Can I run a report based on results of another Post Reply Post New Topic
Author Message
Pobble
Newbie
Newbie


Joined: 20 Jan 2012
Location: United Kingdom
Online Status: Offline
Posts: 12
Quote Pobble Replybullet Topic: Can I run a report based on results of another
     Posted: 22 May 2012 at 5:51am
CR X1

I have two tables - a stock master and sales history and I want to look at products that are in the stock master and do not appear in the history table in a date range.

In other words products where there are no records in a given date range in the sales history table.

I have tried left outer join, but it does not appear to work as I expected.

I expected all 53,169 records to be returned from the stock master table, with nulls where there was not a matching sales history record.

Instead the result gives me 4,115 records and no null fields.

Any suggestions?

Thanks



IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 May 2012 at 10:52am
you have to apply the date range prior to the join (like with a crystal command or stored proc) or you can use a group select criteria
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum