OneFineDay
OneFineDay

Reputation: 9024

Count of a Summary Field

I need to get a count of a summary field in Crystal reports desktop. I know Crystal will not allow me to do this, so I need a workaround.

I have tried RunningTotals to no avail. Here is the setup. This example show that there are several records for the related table and there are several occurances of a valueIfPerformed of 1 - what I need to get a count of 1 for that group - not the actual number of times performed. If a group has all zeros then 0 if there is at least one 1 then 1. Now I can do that with a max summary for each group, but I need to get a sum of all groups and this is where Crystal reports is jamming me up - I can't find a way to do this. Any ideas?

Group1      item#      Desc      valueIfPerformed
             1234       
Details                 xx               0
                        xx               1
                        xx               1

Upvotes: 0

Views: 716

Answers (1)

CoSpringsGuy
CoSpringsGuy

Reputation: 1645

untested----- formula 1 placed in Group footer

global numbervar A;

whileprintingrecords;
if max(valueIfPerformed,{group1}) = 1 then 
    A := A+1;

formula 2 placed in report footer

global Numbervar A;
whileprintingrecords;
A

Upvotes: 1

Related Questions