Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Data Connectivity
Message Icon Topic: linking tables removes data Post Reply Post New Topic
Author Message
Jimminy-Bob
Newbie
Newbie
Avatar

Joined: 22 Jul 2009
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote Jimminy-Bob Replybullet Topic: linking tables removes data
    Posted: 22 Jul 2009 at 12:39am

I have a number of tables (i think 3 in total) with vaious data in them, mainly to do with attendance. I have them all linked up joined on an ID field which is unique to each person) so that i can gather data from all 3 tables.

The problem is when i try to use a formula with values from one of the tables. Some of the IDs are not in this table (as this one is the persons attendance at a different site and so some have not gone there) and so the moment i put this formula into the report the IDs of the people that are not in the table disappear and i cant see why.

I've tried changing the report links between the tables and so on but nothing i've done works. Can anyone suggest something i can try?

Oh and i've found that i cant put all the data into a single table as when i use the formula it brings back the wrong value. I'm guessing its something to do with the links or something but i just cant think what it could be
 
Thanks for your help

Any help is appreciated
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Jul 2009 at 7:03am

I assume youa re using a left join to make sure you get all the records.

If you use anykind of select statement on a field that come fom either table that has the fewer records it will change this to an inner join and the records will drop.
If you are just palcing a formula field on the canvas try altering to handle the NULL ID values to include them in the process.
If isnull(table.ID) then " " else formula here
Make sure you use the ID field from the table that has the fewer records.
IP IP Logged
Jimminy-Bob
Newbie
Newbie
Avatar

Joined: 22 Jul 2009
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote Jimminy-Bob Replybullet Posted: 24 Jul 2009 at 5:47am
Thanks this works perfectly! I've been stuck on this for ages and not even thought of that
IP IP Logged
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.031 seconds.