Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Address contact not showing Post Reply Post New Topic
Page  of 2 Next >>
Author Message
mgreen
Newbie
Newbie


Joined: 25 Oct 2010
Online Status: Offline
Posts: 7
Quote mgreen Replybullet Topic: Address contact not showing
    Posted: 25 Oct 2010 at 5:34am
Good Morning,
 
  I have just tried using Crystal reports for the first time and I am importing a database into crystal reports inorder to use that information in my report.   Well I have gotten my report setup and it pulls in all my contact and address information fine. But when I go to preview the report it will not show up a contact if they do not have a phone number.  How do I get it to show contacts regardless of a phone number being there or not.
 
Thank you for your time,
 Michael
 
I am using Crytsal Reports Version 11
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Oct 2010 at 6:00am
did you write a formula combining fields into a single string?
IP IP Logged
mgreen
Newbie
Newbie


Joined: 25 Oct 2010
Online Status: Offline
Posts: 7
Quote mgreen Replybullet Posted: 25 Oct 2010 at 6:03am
I don't think so, I have just pulled the fields over from the field explorer and put them in the detail section of a blank report. Do I need to creat a formula?
 
Have a great day,
 Michael
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Oct 2010 at 6:14am
No you don't have to but if you were and there were NULL values in the phone it would explain the behavior.
are you using more than one table adn if so are you doing outer joins?
If you are doing outer joins are you using a select statement?
IP IP Logged
mgreen
Newbie
Newbie


Joined: 25 Oct 2010
Online Status: Offline
Posts: 7
Quote mgreen Replybullet Posted: 25 Oct 2010 at 6:25am
- I think I am only using 1 table. 
- There are NULL values because some contacts have never had phone numbers.
- I'm not sure if I am using select statements. I just clicked and dragged the fields over.
 
Thank you for the help so far.
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Oct 2010 at 6:32am
Go into Database Menu and select Databse Expert.
How many tables are in the 'Selected tables' window?
If there are more than 1 go into the Links tab of that window.
double click on the joni line and see what the join type is.
If it is an inner join you need to make it an outer join. Left or Right depends on whcih way the tables are set to.
IP IP Logged
mgreen
Newbie
Newbie


Joined: 25 Oct 2010
Online Status: Offline
Posts: 7
Quote mgreen Replybullet Posted: 25 Oct 2010 at 8:18am
Ok I looked and there is only 1 database in that window.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Oct 2010 at 8:29am
1 DB or 1 table? I'll assume 1 table but just want to make sure.
This is odd...
 
If you remove the phone# field from your report all the records show up, but if you drag and drop the phone # field onto the detail section records start to disappear.
is that a correct description?
IP IP Logged
mgreen
Newbie
Newbie


Joined: 25 Oct 2010
Online Status: Offline
Posts: 7
Quote mgreen Replybullet Posted: 25 Oct 2010 at 8:39am
Yes that is correct about the description of the problem.  I think what is happening is that when Crystal Reports sees that there isn't a phone number it just doesn't print that entire contact (ie. Name and address)
 
I think it is a DB. the top of the tree is Field explorer says "Database Fields"
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Oct 2010 at 8:46am
I am almost positive you have at least 2 tables in this report. They will be from the same DB.
Likely you have a CONTACTS table and a PHONE table which are joined togther as an inner join on the CONTACT ID field.
IN your Field explorer (top of your tree), expand the Database Fields.
Now you should see 2 or more table names (CONTACTS and PHONES). If you expand the table names you will see the fields/columns in each table.
 
Here is what I am pretty sure is happening.
Crystal does not enforce joins just by making the join (like in SQL). You have to tell it to be enforced in the join set up or it will enforce the join when you use fields from both tables anywhere in the report. So when you exlude the phone number all the contact names appear. As soon as you use the phone number the join is enforced and the names disappear becase ther eis no row in the PHONE table to match to any row in the CONTACTS table.
Is this more on track?


Edited by DBlank - 25 Oct 2010 at 8:48am
IP IP Logged
Page  of 2 Next >>
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.016 seconds.