Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Possible Joining/Linking problem? Post Reply Post New Topic
Author Message
Robotacha
Groupie
Groupie
Avatar

Joined: 11 Nov 2009
Location: United Kingdom
Online Status: Offline
Posts: 97
Quote Robotacha Replybullet Topic: Possible Joining/Linking problem?
    Posted: 03 Nov 2011 at 6:34am
Hello,
 
I have 2 TABLES from 2 different DATABASES.
 
TARGETCUSTOMERS table is an excel spreadsheet with fields:
CODE
ACCMANAGER
TARGET
 
CUSTRANSACTIONS table is located on our main database with fields
CODE
QTY
INVOICENUMBER
BRAND
etc etc.... (basically all the transaction data)
 
 
I have set up the report, and linked the tables like:
 
TARGETCUSTOMERS.CODE --->  CUSTRANSACTIONS.CODE  
(Left outer join) (Not enforced)
 
 
problem:
 
Grouped by TARGETCUSTOMERS.CODE.
 
these are a few accounts in the TARGETCUSTOMERS table:
 
4PBTREB
4PENTO
4PENISTO
4ROGER
4ROGBAR
 
When I drop the CUSTRANSACTIONS.QTY field into the groupheader,
 
4PENISTO dissapears from the report.
 
The select expert filters to only show the last 3 months data, and 4PENISTO has not purchased anything in the last 3 months, which would mean that there is no data to display.
 
But I thought, using the LEFT OUT JOIN to link the tables, would still show this customer in the report, but with a 0 qty.
 
 
Am I missing something simple here? do I need to include some isnull somewhere?
 
 
I dont have this problem when I have done similar linking before, BUT previously I have only ever used tables from the same database.
 
 
Can anyone help?
 
 
Regards,

Michael Jones
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Nov 2011 at 6:43am
when you used the field from your other table it automatically 'enforced' the join and changed your dataset.
IP IP Logged
Robotacha
Groupie
Groupie
Avatar

Joined: 11 Nov 2009
Location: United Kingdom
Online Status: Offline
Posts: 97
Quote Robotacha Replybullet Posted: 03 Nov 2011 at 6:58am
How can I ressolve it? so it displays all customers in the TARGETCUSTOMER table regardless of whether it has matching data in the TRANSACTION table or not.
Regards,

Michael Jones
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Nov 2011 at 7:16am

try reversing your join.

however I think I remember reading somewhere that using excel as a source will not allow for outer joins...
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.