Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Left outer join not working Post Reply Post New Topic
Author Message
crstar
Newbie
Newbie


Joined: 02 Aug 2012
Online Status: Offline
Posts: 31
Quote crstar Replybullet Topic: Left outer join not working
     Posted: 03 Jan 2013 at 7:57pm
Hi experts,
 
I have a table "TitleMaster" which storing ID and Title, which is to display the title for each row.
For Eg:
ID   |   Title
--------------------------------------------------------
1     |   Total of Employee
2     |   Total Sales
3     |   Total of Customer
 
Another table "BranchData" storing data by branch.
For Eg:
TitleID  |  Branch Code   |  Data  
1          |  BR01               |  600
1          |  BR02               |  500
2          |  BR01               |  100000
 
 
In crystal report, user can select branch code. The report will left outer join TitleMaster table with BranchData table on TitleMaster.ID = BranchData.TitleID.
 
If there is some titleID not found in table BranchData, i would like to show all the title as well. Hence i try to use left outer join.
 
Expected Result (for Branch BR01)
 
Title                        | Data
--------------------------------------------------------
Total of Employee    | 600
Total Sales              | 100000
Total of Customer    |  <empty>
 
 
But I found that even I set the left outer join in Database Expert, the report will only show the title ID that have record in BranchData.
Title                        | Data
--------------------------------------------------------
Total of Employee    | 600
Total Sales              | 100000
 
 
Any idea on this or any workaround way?
 
Thank you.
& Happy New Year to all of you :)


Edited by crstar - 03 Jan 2013 at 8:04pm
IP IP Logged
pacuccaro
Newbie
Newbie
Avatar

Joined: 16 Sep 2011
Location: United States
Online Status: Offline
Posts: 17
Quote pacuccaro Replybullet Posted: 04 Jan 2013 at 3:48am
i am very new at crystal reports but i would suggest checking for null vales since there is nothing found it may return a null and mess you up - maybe try something like if total of customers isnull then total of customers := 0
that might set it to anull value and let you display it
 
sorry i am still new at this
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