Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Disappearing Records Post Reply Post New Topic
Author Message
khaines
Newbie
Newbie


Joined: 14 Dec 2011
Location: United States
Online Status: Offline
Posts: 10
Quote khaines Replybullet Topic: Disappearing Records
     Posted: 14 Dec 2011 at 6:23am
In a subreport, I am listing out contacts for a company:

Bob
Sue
Ray

If I add in, in the Details section, their phone number, it removes all records that do not have a phone number. This isn't what I want. I just want it to be blank.

I'm sure it's something basic, but I'm lost big time.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Dec 2011 at 7:32am
it is a join issue.
in crystal the join is not enforced unless you set it to enforced in the join properties or if you use a value from both tables in the join.
IP IP Logged
khaines
Newbie
Newbie


Joined: 14 Dec 2011
Location: United States
Online Status: Offline
Posts: 10
Quote khaines Replybullet Posted: 14 Dec 2011 at 7:32am
Is that in the smart linking stage?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Dec 2011 at 7:50am

i don't use the deign wizard so not sure.

if you go into
Database
database expert
links tab
you can set the properties there.
likely you need an outer join but I don't know your data / tables or if you have a select statement that would make the outer join moot.
IP IP Logged
khaines
Newbie
Newbie


Joined: 14 Dec 2011
Location: United States
Online Status: Offline
Posts: 10
Quote khaines Replybullet Posted: 14 Dec 2011 at 8:08am
No select statement. But, no matter how I set the link, I get an error:

"Failed to retrieve data from the database"
"Database connection error: 'DAO Error Code 0xce0 Source DAO.Database
Description: Join expression not supported'

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Dec 2011 at 8:15am

what does your sql statement look like?

IP IP Logged
khaines
Newbie
Newbie


Joined: 14 Dec 2011
Location: United States
Online Status: Offline
Posts: 10
Quote khaines Replybullet Posted: 14 Dec 2011 at 8:25am

SELECT `CnRelCt_1Saluta`.`CnRelCt_1Saluta_Addressee`, `CnRelCt_1AdrPh_1`.`CnRelCt_1AdrPh_1_Phone_number`
FROM   ((`CnRelCt_1` `CnRelCt_1` LEFT OUTER JOIN `CnRelCt_1Adr` `CnRelCt_1Adr` ON `CnRelCt_1`.`CnRelCt_1Adr_LINK`=`CnRelCt_1Adr`.`CnRelCt_1Adr_LINK`) INNER JOIN `CnRelCt_1Saluta` `CnRelCt_1Saluta` ON `CnRelCt_1`.`CnRelCt_1Saluta_LINK`=`CnRelCt_1Saluta`.`CnRelCt_1Saluta_LINK`) INNER JOIN `CnRelCt_1AdrPh_1` `CnRelCt_1AdrPh_1` ON `CnRelCt_1Adr`.`CnRelCt_1AdrPh_1_LINK`=`CnRelCt_1AdrPh_1`.`CnRelCt_1AdrPh_1_LINK`
ORDER BY `CnRelCt_1Saluta`.`CnRelCt_1Saluta_Addressee`
IP IP Logged
khaines
Newbie
Newbie


Joined: 14 Dec 2011
Location: United States
Online Status: Offline
Posts: 10
Quote khaines Replybullet Posted: 14 Dec 2011 at 8:27am
GOT IT TO WORK!

I wasn't doing the outer join on the correct field. Thanks for your help, sorry for being obtuse!
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