Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: One to Many Evaluation Post Reply Post New Topic
Author Message
Dragon001
Newbie
Newbie
Avatar

Joined: 12 Apr 2011
Online Status: Offline
Posts: 6
Quote Dragon001 Replybullet Topic: One to Many Evaluation
     Posted: 17 Nov 2011 at 8:49am
Hi, folks.

I have a table of employees and a table of certifications. An employee may have 0-15 certifications (and dates completed).

I'm trying to generate a single line report like this:

NAME - CPR DATE - FIRST AID DATE - Etc

I've made an evaluation formula:

If {Cert_Table.Type} = "CPR" then {Cert_Table.Date}

This works brilliantly...as long as CPR is the first record that matches the employee ID. If it is the second, it leaves the field erroneously blank.

I know the ideal way to show this would be a list, but the boss wants a single-line representation of the key certification dates.

How do I get crystal to report back the CPR date regardless of which order it appears?

Thanks in advance!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Nov 2011 at 9:44am
you will have to use grouping on the employee and then you can use Running Totals or shared variables to display in the group footer.
Or you can use another formula method to get the dates into the group header.  This is closer to your attempted process. To do that you would create the formuals as you were and then use Maximum group value of each formula that you want to check for.
CPR as an exmple:
//CPRdate
If {Cert_Table.Type} = "CPR" then {Cert_Table.Date}
//CPRMaxdate

 
 
 


Edited by DBlank - 17 Nov 2011 at 9:46am
IP IP Logged
Dragon001
Newbie
Newbie
Avatar

Joined: 12 Apr 2011
Online Status: Offline
Posts: 6
Quote Dragon001 Replybullet Posted: 17 Nov 2011 at 10:39am
Maximum formula worked like a charm.

Huge thanks!
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum