Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Selecting most recent record Post Reply Post New Topic
Author Message
lowester
Newbie
Newbie


Joined: 30 Sep 2011
Online Status: Offline
Posts: 23
Quote lowester Replybullet Topic: Selecting most recent record
     Posted: 30 Sep 2011 at 9:34am
Hi, I have a database full of clients and events.. Example client 123 had and event on 08242011 in an Outpatient Program. Im trying to pull the last event each client had.. Example if client 123 had 3 events.. 1 in june, 1 in july, 1 in august.. i want the report to show only the 1 for august since is that most recent event. Looking for some guidance on how to do this.. thanks!
There are also other clients in the database and want the report to pull the most recent event for each individual client..
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 30 Sep 2011 at 10:10am
If you don't have to do any summaries (counts, sums, etc) try this:
 
1.  Group by client.
2.  Sort by date descending.
3.  Put all of your data in the client group header section.  This will give you the most recent record for each client.
 
-Dell
IP IP Logged
lowester
Newbie
Newbie


Joined: 30 Sep 2011
Online Status: Offline
Posts: 23
Quote lowester Replybullet Posted: 03 Oct 2011 at 3:19am
Worked like a charm.. thanks!!! appreciate your help
IP IP Logged
arunvisak
Newbie
Newbie
Avatar

Joined: 02 Aug 2011
Location: India
Online Status: Offline
Posts: 8
Quote arunvisak Replybullet Posted: 31 Oct 2011 at 12:35am
really nice thinking..
D.A.V
arun@indusnovateur.com
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