Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Count of a Max Post Reply Post New Topic
Author Message
kgbo
Newbie
Newbie


Joined: 26 Jun 2013
Online Status: Offline
Posts: 30
Quote kgbo Replybullet Topic: Count of a Max
    Posted: 01 Aug 2013 at 3:23am

I have a report that has two groupings, and then I am pulling the max of specific fields.

Example:
                        Started              Color 
Jane Doe           Yes                     Blue
John Smith        Yes                     Green
 
These fields would all be a max summary. I want to do a count of how many fields are a "Yes".
 
The yes fields behind the summary of a max are a formula where in example it would be: if {my.table}=123 then "Yes" else if {my.table}=321 then "No".
 
Any help would be greatly appreciated!
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 02 Aug 2013 at 4:42am
I am guessing a running total would work, but that is not my forte. Shared variables would work as well.

typically in groups of 3 formulas for shared variables
1) reset, usually a group header:
shared numbervar x := 0;
"" //will hide the reset

2) increment, usually in the detail section:
this would by your existing formula with a minor alteration:
shared numbervar x;
if {my.table}=123 then(x:=x+1; "Yes") else if {my.table}=321 then "No"

3) display, usually in a group footer:
shared numbervar x

HTH
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.