Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Most recent date Post Reply Post New Topic
Author Message
Tilley
Newbie
Newbie


Joined: 23 Jun 2009
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote Tilley Replybullet Topic: Most recent date
     Posted: 23 Jun 2009 at 6:21am
Hello
 
I'm a bit stuck by this.
 
I need to show the most recent diagnosis next to the appointment in a report, problem is they are not linked,
 
A patient can have many diagnosis and many appointments, but by logic I need to show the most recent appointment with the newest diagnosis
 
any ideas?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 23 Jun 2009 at 6:28am
do you need to show the older diagnosis?  If not, you could create a stored procedure that would show the top 1 for each patient (group by patient), or a stored proc that has a column for most recent date and suppress all records that are not for that date (don't really like this as you are retrieving much more data than you need)
 
I really favor stored procedures as they give you way more flexibility in creating your data.  Crystal is really pretty simple in this regard.
 
You could also sort the patient data by appt date, that should bring the newest the top.
 
HTH
IP IP Logged
Tilley
Newbie
Newbie


Joined: 23 Jun 2009
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote Tilley Replybullet Posted: 25 Jun 2009 at 6:56am
I only need it to show the most recent diagnosis. Currently it is showing the selected days appointment repeated for each diagnosis. Instead of  showing the appointment once with just the most recent therefore the relivent one.
 
Therefore the next question is how do I create a stored procedure? 
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