Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Data Duplicates when adding field Post Reply Post New Topic
Author Message
jtr8178
Newbie
Newbie


Joined: 09 Jan 2014
Location: United States
Online Status: Offline
Posts: 5
Quote jtr8178 Replybullet Topic: Data Duplicates when adding field
     Posted: 14 Jan 2014 at 3:32am

I work for a truck dealership, and we have a service department report that gives us some totals on the technicians efficiency on each job billed for a period of time. This report is as follows:

 
However, I want to add a Sum of the total hours the technician was available to work during the same period. So I think to myself, no big deal, lets just go to our database table and pull up the ActualHours worked during the week, do a summary, and add it to a Group Header. However, when I do that I get this:
 
 
The report repeats a bunch of the rows... Is this a database linking issue, or what is causing this?
Tyler - Robertson
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Jan 2014 at 4:01am
so you did not add a new table but just a field?
This usually indicates that the table join was not enforced. ONce you added a field to use it enforced the join which is what is causing the row duplication.
Check the joins.
IP IP Logged
jtr8178
Newbie
Newbie


Joined: 09 Jan 2014
Location: United States
Online Status: Offline
Posts: 5
Quote jtr8178 Replybullet Posted: 14 Jan 2014 at 4:04am
No, I added the table and the field. I will check my joins and play with the enforce option.
Tyler - Robertson
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Jan 2014 at 4:17am
Check your join more than the enforce option. if you use a field from the table it will be enforced. You may also be missing a 'middle' table to better define your technician hours as associated to a job. Maybe a job steps table?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 15 Jan 2014 at 5:56am
And it could be that there are multiple records in for each technician in the new table and that is what is causing the duplication of data. You might have to use a subreport in the group header to get the total available hours for the technician - that way you're not joining to that table in the main report but you can still get your numbers.

-Dell
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