Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Duplicate Results Post Reply Post New Topic
Author Message
jamesrm
Newbie
Newbie


Joined: 04 Nov 2008
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote jamesrm Replybullet Topic: Duplicate Results
     Posted: 04 Nov 2008 at 1:45am
Hi,

First post and in need of some help.

I have created a simple report taking out from our MSSQL database data: 'jobnumber' and 'quote amount' plus some other info such as contact details etc...

In our database we have some duplicate entries so on this report I often get duplicate results. I cannot remove the duplicate entries from the database as they are needed - so can I get Crystal Reports to take out all the duplicate job numbers in the report unless the quote amount is different?

Thanks
James
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 04 Nov 2008 at 2:36am
Hi,
 
Can you post some sample data,In the meantime you can try Selecting distinct records.
 
Cheers
Rahul
IP IP Logged
jamesrm
Newbie
Newbie


Joined: 04 Nov 2008
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote jamesrm Replybullet Posted: 04 Nov 2008 at 3:03am
Field job_number - data usually just 123456 format
Field quoted_value - data £999,999 format

Often though we have a few records on the report duplicated as often we send out multiple quotes for one job as we quote the same amount to each of the people who may do the work.

Basically I am trying to add up all the sent out quotes for a particular time frame. It is all working except this duplicate results for some jobs.

 I need something along the lines of either remove or display in red or something so I can identify them - where the job number is a duplicate and also the quote amount is duplicate.

If the job number is the same but the quote amount is different then that if fine and nothing needs to be done about it.

Thanks
James
IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 04 Nov 2008 at 3:07am
you can do this by grouping it on job number and quote amount. u can use a running total to find out  the duplicates
Thanks
Savan
IP IP Logged
jamesrm
Newbie
Newbie


Joined: 04 Nov 2008
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote jamesrm Replybullet Posted: 04 Nov 2008 at 3:12am
Yes at the minute all the job numbers are displaced in order so I can see all the duplicates and they are under each other for example it goes job: 1123, 1124, 1125, 1125, 1125 all with quotes next to them.

I just want to stand out - perhaps make all the duplicate font colour Red?

Thanks
James

IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 04 Nov 2008 at 4:09am
instead of group, you can use  sort the records on job number and quote amount and
in the format option of the field select the  font tab and select the formula button in front of the color button, in the formula section u can write the following syntax
if jobnumber = previous(jobnumber)   and quoteamount = preivous(quoteamount) then
   crred
else
 crblack
 
so u will get the duplicates in red
 


Edited by Savan - 04 Nov 2008 at 4:13am
Thanks
Savan
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