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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtotal of visible fields only 1

Status
Not open for further replies.

JohnnyLong

Programmer
Sep 27, 2002
97
GB
Hi there,

I am using Crystal 9 and am having a problem subtotalling a field in a group footer. I have 3 groups and the "Required" field from the stored procedure is in Group Footer #3 under the Details (so it doesn't repeat for every detail line). How do I subtotal this field in Group Footer #1? When I do a running total it sums the "Required" field for each record in the detail and not just the visible Footer #3 field. Any help much appreciated.

Thanks
 
One way to do this is use the 3 formula technique

//@Reset - Place in GH1 suppressed
WhilePrintingRecords;
Shared NumberVar ReqTotal :=0;

//@Accumulate - Place in GF3 suppressed
WhilePrintingRecords;
Shared NumberVar ReqTotal := ReqTotal + {Required};

//@Display - Place in GF1
WhilePrintingRecords;
Shared NumberVar ReqTotal;

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
Thanks alot Gary, you're a star. Would never have worked that out!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top