Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Selecting Distinct Records Post Reply Post New Topic
Author Message
jessiemacmillan
Newbie
Newbie
Avatar

Joined: 17 Apr 2008
Location: United States
Online Status: Offline
Posts: 18
Quote jessiemacmillan Replybullet Topic: Selecting Distinct Records
    Posted: 14 Aug 2008 at 8:13am
I have lots of experience creating queries in Access; now I'm learning Crystal XI. Getting distinct records in Crystal is making me crazy!

I generally create two types of queries: one for "cases" and the other for "clients." Counting cases is easy. Getting demographic data on clients is harder because clients can have multiple cases. Typically, I need to get demographic data for clients who have cases opened or closed within a specific time period.

I created a query in Access to get distinct client ids from cases opened within the last week. Then I tried to do the same thing in Crystal. I managed to get distinct ids in Crystal but the count was off by 1. I've looked and tried everything I can think of, but I cannot figure out why I'm getting just one duplicate client id. There are other duplicate client ids in the data set, but only one makes it into the Crystal output.

Any ideas?

Thanks,
Jessie
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 14 Aug 2008 at 1:52pm
Instead of selecting distinct records, try grouping on client and putting the client demograhpic data in the group header or footer to display it.  To get a count of clients, you then add a summary that is a Distinct Count of the client ID.
 
-Dell
IP IP Logged
jessiemacmillan
Newbie
Newbie
Avatar

Joined: 17 Apr 2008
Location: United States
Online Status: Offline
Posts: 18
Quote jessiemacmillan Replybullet Posted: 25 Aug 2008 at 7:28am
This was ridiculously easy once I was able to put aside my Access mindset and start thinking more like a Crystal Report. Thanks for helping!
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.