Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: distinct records option Post Reply Post New Topic
Author Message
jknockler
Newbie
Newbie


Joined: 05 Mar 2009
Location: Ireland
Online Status: Offline
Posts: 32
Quote jknockler Replybullet Topic: distinct records option
    Posted: 16 Mar 2009 at 7:10am
hi,

when i run my report, the following table is produced:

cust# age status
123     21      in
123      21     out
123      21      out
123      23      up
123      21      down
124      21      out
126      22       in
126      22      out
126      21       up

(i believe the reason i am getting duplicate records for the same cust#, is because i am linking 2 db tables by cust#. as you can see there are multiple records in the second database (which contains the 'status' field) for every cust# in the first database.

what i want to produce is the following:

cust#
123     etc
124     etc
126     etc ( so the distinct records option when i click on 'database'->'distinct records' is selecting the distinct records based on the cust#)

what i am getting is:

cust# age status
123      21     in
123      21     out
123      23      up
123      21     down
124      21     out
126      22       in
126      22      out
126      21       up

so now whats happening is the distinct records option, is selecting the distinct records based on the 'status' field.

How to do set it so that when i click on 'database' -> 'distinct records', It bases the distinict records on the cust# field ?

thanks

j
J
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Mar 2009 at 7:33am
I believe that by doing your join you are going to get multiple records regardless of your distinct record selection.
IN your example "you want to produce the following" what is the "etc." you want to get and is there other data in that table that you can use to filter on (e.g. meeting date, entry date, sequential numbering process, etc.). Also what type of DB and do you have rights to create views or stored procs if it is SQL? If so that may be the way to go to handle our record selection before it gets to crystal. 
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.