?
Solved

crystal report formula do while statement

Posted on 2013-06-13
3
Medium Priority
?
775 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 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 35

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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

718 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