Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding together Group Totals

Status
Not open for further replies.
Jul 15, 2008
8
GB
Hi All,

I think I am missing something here, but its driving me nuts!!!

I have three groups. Group three contains multiple records for various learners, and using a formula I have forced a 'Y' if certain criteria is met, a 'N' if not, in the group header.

In group one, I want it to count FROM THE HEADER of group three how many records are 'y' or 'n', and NOT the number of records that contain a 'y' or 'n', within that group.

Does that make sense??!!! If a learner has 4 records with a 'Y' in group three, I want that to be count as ONE 'y' in group one.

Help!!!

Thanks

Di Nicholls

 
If I've understood correctly, you want to count one for each learner who has at least one record meeting the criteria. Group 3 groups records for a single learner. Group 1 groups many learners. But you want the total in the header of Group 1.

I don't think this is possible. Summary totals can go in the header. Using a formula, you can get the summary total count of a conditional field like
Code:
if {your.field} = "Y" then 1
else 0
I can't see any way you could impose the extra rule of just counting once for each learner, that is a group property. You could do that with a running total but that would need to be in the footer.

You could do it with a subreport in the Group 1 total that does the whole task and returns the answer. The subreprot could just display the value, or it could pass it back using a Shared Variable, allowing it to be used further in the main-report section below the section that has the subreport.

The use of Crystal's automated totals is outlined at FAQ767-6524.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Where do you want the result displayed--in GH1 or could it be in GF1? What fields are you grouping on? Can the same learner appear in more than one Group #3?

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top