Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Problem combining columns Post Reply Post New Topic
Author Message
Papercutwd
Newbie
Newbie


Joined: 21 Mar 2012
Online Status: Offline
Posts: 4
Quote Papercutwd Replybullet Topic: Problem combining columns
     Posted: 21 Mar 2012 at 7:55am
Hard one to put to words, but I am trying to combine a list of names from two different tables to create a single column list.  In the report, each of these columns come from a different table. 
 
{account.owner}-{mains.name}  (mains.name is linked to account.owner)
{account.joint} -< {joints.name}  (joints.name is left linked to account.joint)
 
I need a column to show all mains and joints.  I do not know how to create a null pairup when a real one exists....
 
Current report output:
Account      Main Owner         Join Owner
1000                john doe        <null>
2000                jane doe         john smith
2000                jane doe         john doe
 
Desired report output:
Account        Main Owner        Join Owner
1000                john doe         <null>
2000                jane doe         <null>                       
2000                jane doe          john smith
2000                jane doe          john doe
 
If I can get this output, then I can create a new column with an if/then.  
 
 
Eventual desired report output:
Account       Onelistingpernameperaccount
1000           john doe    
2000           jane doe
2000           john smith
2000           john doe 
 
 


Edited by Papercutwd - 21 Mar 2012 at 7:57am
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 21 Mar 2012 at 12:38pm
i assume that you have two table and you use account_no to join them
try going into database expert >>links tab doable click on the join (line that connects your two tables) and change it to left outer join.
but that is if i understood what you were asking
IP IP Logged
Papercutwd
Newbie
Newbie


Joined: 21 Mar 2012
Online Status: Offline
Posts: 4
Quote Papercutwd Replybullet Posted: 22 Mar 2012 at 4:27am

I am new to crystal reports so sorry about my wording.

I have three tables.   The main table is account.  I am joining two tables to the accounts table: the mains and the joints.   The joints is left outer joined to account.  The mains is inner joined (changing this to left outer join does not affect results; tried it).    All accounts have a mains, but not all accounts have a joints.   The left join on joints allows me to have the mains+null pairup when there is not a joint.

Basically, I am trying to create a mains+null pairup even when there are mains+joints pairups, I get a mains+null pairup only when there is not a joints.

 
Scenario:
Mains ----  Account -------> Joints  
 
Mains (Inner join to account table by MainID)
MainID   Name
1            John Doe
2            Jane Doe
 
Account
AccountID    AccountNum     MainID
21                1000                1
33                2000                2
 
Joints  (left outer join to account table by AccountID)
JointID  AccountID     Name
1           33                John Smith
2           33                John Doe
 
Maybe what I am attempting is the wrong approach. 
 
I can create a column that "looks" like it is one column by grouping the results by mains and then aligning the joints data and the group headers mains name.   I get blanks on the mains+null pairups.    However, I do not want it to look like one column, I want it to be one column...
 
 
 
Thx for assist.
 
 
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