Solved

crystal report formula do while statement

Posted on 2013-06-13
3
641 Views
Last Modified: 2013-06-14
Hello. I am new to Crystal. I have been handed a task where I need to get a date based on a specific location code.

Location Code      Date

12                           12/14/2012
14                           03/10/2013
11                           05/09/2013  
14                           06/24/2012
21                           10/12/2012

Not sure where to start. I believe I need a do while statement. Both of these fields are in the same table. Should be pretty easy, I'm just have not found anything to get me started yet.
0
Comment
Question by:truckkev
3 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39245998
Crystal works on 1 record at a time so there is nothing you can loop through.

Do you need all the records for the report?

Try this
Add a formula to the report
Name - LocationDate
If {Location Field} = DesiredLocation then
    {DateField}
Else
    Date(1900,1,1)

You can then get your value with
Maximum(({@LocationDate})

mlmcc
0
 
LVL 34

Expert Comment

by:James0628
ID: 39247094
What are you actually trying to do?  Are the codes and dates that you posted sample data?  If so, what are you trying to get from that data?

 James
0
 

Author Closing Comment

by:truckkev
ID: 39247985
Thanks,

That worked. It also cleared up some questions I had about Crystal. Thanks again.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question