Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Possible in Crystal??! help please Post Reply Post New Topic
Author Message
colman1212
Newbie
Newbie


Joined: 08 Jul 2010
Location: Ireland
Online Status: Offline
Posts: 36
Quote colman1212 Replybullet Topic: Possible in Crystal??! help please
     Posted: 15 Jul 2010 at 1:08am
 
Ok so I have two tables, an inventory table and a customer table.
 
I want to generate a report in crystal 10 that will pull back the inventory items from the inventory table and the customers location from the customer table.
 
 However if there is no corresponding row on the customer table then I want it to display a blank location. Is this possible?!
 
Any hepl would really be appreciated - stumped....
IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 15 Jul 2010 at 1:55am
if its only those 2 tables (inventory and customer) it will be difficult to trace/track it.
because in customer table, usually, contains all information about the customer it self. and there is no relation with our inventory table.
 
but if you can link it with other tables (sales table for example) then it possible to get the result by linking the customer, item sold and inventory.
 
correct me if i'm wrong.
 
 
hope can help.
 
Emir W
IP IP Logged
colman1212
Newbie
Newbie


Joined: 08 Jul 2010
Location: Ireland
Online Status: Offline
Posts: 36
Quote colman1212 Replybullet Posted: 15 Jul 2010 at 2:12am
Originally posted by Emir_W

if its only those 2 tables (inventory and customer) it will be difficult to trace/track it.
because in customer table, usually, contains all information about the customer it self. and there is no relation with our inventory table.
 
but if you can link it with other tables (sales table for example) then it possible to get the result by linking the customer, item sold and inventory.
 
correct me if i'm wrong.
 
 
hope can help.
 
 
Well the tables are linked by a key value so thats not my problem but my issue is like below:
 
Inventory.Inventory_item       Customer.Customerlocation
  A                                                      Ireland     
  B                                                       England
  C                                               -------------------------
 
 
 
If inventory item 'C' has no row on the customer table, then  my report is just leaving out this item entirely. Can I get the report to include the inventory details if there is no corresponding customer information?
So I want it to include the customer information if there is a corresponding row, but if there is not, then just include the inventory item details.


Edited by colman1212 - 15 Jul 2010 at 2:14am
IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 15 Jul 2010 at 3:09am
ahaa..
you can use left join for that purpose.
so it will print all information from inventory table even there is no link w/ customer table.
 
and create a formula to check if there is a link w/ the customer.
something like:
if not isnull(customer_data) then customer_detail
else item_details
 
and put this formula in your detail.
 
 
hope it help.
 
Emir W
IP IP Logged
colman1212
Newbie
Newbie


Joined: 08 Jul 2010
Location: Ireland
Online Status: Offline
Posts: 36
Quote colman1212 Replybullet Posted: 15 Jul 2010 at 4:44am
Originally posted by Emir_W

ahaa..
you can use left join for that purpose.
so it will print all information from inventory table even there is no link w/ customer table.
 
and create a formula to check if there is a link w/ the customer.
something like:
if not isnull(customer_data) then customer_detail
else item_details
 
and put this formula in your detail.
 
 
hope it help.
 
 
GREAT!!!!! Thanks a mil man.


Edited by colman1212 - 15 Jul 2010 at 4:55am
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