Print Page | Close Window

get the latest date

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=20999
Printed Date: 26 Apr 2024 at 9:50am


Topic: get the latest date
Posted By: carmenv323
Subject: get the latest date
Date Posted: 25 Aug 2014 at 5:50am
This is how my data looks:

635584 8/10/2012 Family Medicine Ba NP
635584 4/18/2013 Family Medicine Egan MD
635584 3/17/2014 Women's Health Prenatal Registration
635584 6/2/2014 Family Medicine Matathia
635584 8/5/2014 Women's Health Forman CNM

I want to only pull the latest appointment which was 8/5/14, I created the formula:
maximum({Command.lastappt}) and was able to do just that!

but I also got the providers too...

635584 8/5/2014 Family Medicine Ba NP
635584 8/5/2014 Family Medicine Egan MD
635584 8/5/2014 Women's Health Prenatal Registration
635584 8/5/2014 Family Medicine Matathia
635584 8/5/2014 Women's Health Forman CNM

So I went ahead and did this...
maximum({Command.lastappt}) & " " & {Command.provider}
and it gave me the same results.

It works the same way even if I group by Provider. What's the best approach?

Thanks in advance!

-------------
Progress is a process.



Replies:
Posted By: z9962
Date Posted: 25 Aug 2014 at 9:55pm
You need to specify to max on the provider group.
 
maximum({Command.lastappt},{Command.provider})



Print Page | Close Window