Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: "Suppress if Duplicated": Post Reply Post New Topic
Author Message
bwagner
Newbie
Newbie


Joined: 16 Nov 2007
Online Status: Offline
Posts: 4
Quote bwagner Replybullet Topic: "Suppress if Duplicated":
    Posted: 17 Nov 2008 at 9:58am
I've seen a few topics on similar subjects, but not sure I found this one.
 
What I'm trying to do is if a certain value is repeated on the data list to suppress the entire row.  Here is an example how the data is set up:
 
Acct #    ID      CustName    CustPhone      DaysDlq
 
 
Since customers may have more than 1 account that is past due their account number can repeat multiple times.  What I would like to do is if the account number repeats, to suppress the entire row so that their phone only gets called once.
 
If this is possible, I'd sure like some help.
 
bw
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 17 Nov 2008 at 10:23am
Yes, this is possible. But first, are you sorting on the account number? You need to have these records in sequential order to make this work.
 
Crystal Reports has a property called 'Suppress If Duplicated' but it only applies to individual fields. Not the entire row. To suppress an entire row, use the PreviousValue() function to compare the current value to the previous record and if they are the same, then suppress it. This prevents dupclicate records from appearing. Here is a sample formula. Put this in the formula workshop button for the Suppress property of the Details section (using your own field names).
{table.accountnum} = PreviousValue({table.accountnum});
 
I actually cover this exact problem in Chapter 8, Advanced Formatting Techniques, of my Crystal Reports Encyclopedia book. You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
skailey
Newbie
Newbie


Joined: 13 Jul 2009
Location: United States
Online Status: Offline
Posts: 13
Quote skailey Replybullet Posted: 13 Jul 2009 at 2:04pm
Even though this wasn't for me at the time, thank you.  I was looking for this answer today.
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.