Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Show non-sales Post Reply Post New Topic
Author Message
fkelly72
Newbie
Newbie


Joined: 20 Oct 2014
Location: Italy
Online Status: Offline
Posts: 1
Quote fkelly72 Replybullet Topic: Show non-sales
     Posted: 25 Nov 2014 at 4:45am
I have 2 tables, table 1 "Stores" and table 2 "Invoices"
My report will show the stores and invoice totals for the previous day, however if there are no sales on any specific store, no data is showing on the report and I would prefer to show the store and a zero value.

I have tried a left outer join from stores to invoices but still not showing.

In my select record my only filter is invoice date = yesterday

example
store number      Total
store 1           100
store 2           0
Store 3           500


Instead I am getting the following
Store 1           100
Store 3           500

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Nov 2014 at 4:49am
you likely have a select criteria of sales.date=yesterday which essentially turns your outer join into an inner join for any store that ever had a sale.
Best solution is to use a command or stored proc and move t that select criteria onto the left join and off the WHERE.
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