Solved

crystal report formula do while statement

Posted on 2013-06-13
3
562 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now