Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Suppress duplicates or more records in report Post Reply Post New Topic
Author Message
kanchan
Newbie
Newbie


Joined: 17 Oct 2010
Online Status: Offline
Posts: 2
Quote kanchan Replybullet Topic: Suppress duplicates or more records in report
    Posted: 17 Oct 2010 at 11:47pm
Hi ,

I am getting the data in my report like this-

5262125371767 6 04/29/2009 COX/GEM Las Vegas Tucson
5262125371767 3 04/27/2009 COX/GEM Tucson Los Angeles
5262125371767 5 04/29/2009 COX/GEM Seattle Taco Las Vegas
5262125371767 4 04/27/2009 COX/GEM Los Angeles Seattle Taco
5262125371767 6 04/29/2009 COX/GEM Las Vegas Tucson
5262125371767 3 04/27/2009 COX/GEM Tucson Los Angeles
5262125371767 5 04/29/2009 COX/GEM Seattle Taco Las Vegas
5262125371767 4 04/27/2009 COX/GEM Los Angeles Seattle Taco
5262125371767 6 04/29/2009 COX/GEM Las Vegas Tucson
5262125371767 3 04/27/2009 COX/GEM Tucson Los Angeles
5262125371767 5 04/29/2009 COX/GEM Seattle Taco Las Vegas
5262125371767 4 04/27/2009 COX/GEM Los Angeles Seattle Taco

i am using previous function to remove the suppress duplicate records but that isnot working because records are not sorted and i can't apply the sort at report level also.please suggest me how can i read all the duplicate records and mark them as duplicate.

Thanks for your help.
kan
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 18 Oct 2010 at 3:15am
one way would be to create a global string variable, and in each detail line, search if the value is already in the string, if it is, it is a duplicate, if not display it AND add it to the string, with a delimiter to help with uniqueness.
 
HTH
IP IP Logged
kanchan
Newbie
Newbie


Joined: 17 Oct 2010
Online Status: Offline
Posts: 2
Quote kanchan Replybullet Posted: 18 Oct 2010 at 3:48am
Thanks for the reply,

I am bit new to this tool , Can you please describe in detail?

Thanks again!!
kan
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 18 Oct 2010 at 4:32am
this would be my approach:
 
global stringvar displayedItems;
 
if instr(displayedItems, {table.field}) = 0 then (
  displayedItems := displayedItems + "|" + {table.field} ;
 {table.field}
)
else
  "duplicate"
 
There are lots of things that can be done, but not knowing too much about the database and the exact requirements of the report, this is an 'outline' to demonstrate the functionality.
 
This would be placed in a formula and the formula would most likely be placed in the Detail Section of the report.
 
HTH
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.016 seconds.