Selecting Distinct Records
Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3984
Printed Date: 05 May 2024 at 3:32pm
Topic: Selecting Distinct Records
Posted By: jessiemacmillan
Subject: Selecting Distinct Records
Date 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
|
Replies:
Posted By: hilfy
Date 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
------------- Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics
|
Posted By: jessiemacmillan
Date 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!
|
|