Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: distinct value like sql version Post Reply Post New Topic
Author Message
masterdineen
Newbie
Newbie
Avatar

Joined: 28 Sep 2010
Location: United Kingdom
Online Status: Offline
Posts: 26
Quote masterdineen Replybullet Topic: distinct value like sql version
     Posted: 04 May 2011 at 10:44pm

I have a report working on Direct Debit payments. But for some reason it is returning multiple payments for the same member number and i want to just return one payment per member number.  I have the desired result in sql server using distinct(member_ref). is there a way in Crystal Reports to gain the same result.

 
  Kind Regards
 
     Rob
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 May 2011 at 3:18am
Try under File> Report Options make the 'Select Distinct Records' as TRue
IP IP Logged
masterdineen
Newbie
Newbie
Avatar

Joined: 28 Sep 2010
Location: United Kingdom
Online Status: Offline
Posts: 26
Quote masterdineen Replybullet Posted: 05 May 2011 at 4:46am
thank you for your reply.
 
is there a way to select distinct on a specific column.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 May 2011 at 5:31am
not really because once you apply the other fields you get the cartesion product. You can do distinct calculations on a specific field using shared variable formulas or Running Totals.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 05 May 2011 at 6:08am
Of course, you could build a stored proc that returns the values that you want....
 
but it seems that most people choose to not take this path
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