Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I write the crystal syntax

Posted on 2011-03-23
3
Medium Priority
?
541 Views
Last Modified: 2012-05-11
Hi, I am building a report that is group by a pat_id and lab dates with results for each of the dates.  For example, id#xxxx08 seen on 09/06/2008 with a result of 5.60
                                                                  02/11/2009 with a result of 7.10
                                                                   01/1/2010 result 11.0
I can write the formula to get the max date with this:
maximum({RESULT_DATE},({PAT_ID}) )
which will give me 01/11/2010 but how do I write the formula to pick up the 11.0? (ord_num_value)
0
Comment
Question by:Kathy_O
[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
  • 2
3 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 35201303
There is no easy formula to get it however, if the order of the data isn't important you can sort by the date and then the record in the group header (descending sort) or footer (ascending sort) will have the value.

mlmcc
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 35201332
If you need them in some other order then you could use a set of formulas like

In the group header add a formula
WhilePrintingRecords;
Global DateVar grpMaxDate := maximum({RESULT_DATE},({PAT_ID}) );
""

In the detail section
WhilePrintingRecords;
Global DateVar grpMaxDate;
Global NumberVar ord_num_value;
If {RESULT_DATE} = grpMaxDate then
      ord_num_value := {ord_num_value};
""

In the group footer
WhilePrintingRecords;
Global DateVar grpMaxDate;
Global NumberVar ord_num_value;
ord_num_value

mlmcc
0
 

Author Closing Comment

by:Kathy_O
ID: 35201777
Thanks I thought I could do this by wrapping formulas but this works really nice!!!
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

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