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

Summing a Formula Field at Group Level 2

Status
Not open for further replies.

NHogan

MIS
Aug 23, 2001
40
0
0
CA
I have a formula field that compares a fields previous and next records and either returns 1 or 0 depending where the condition is true or false. Now I want to sum the formula field to give be a total at the group level.

How can I sum the formula field so I will have a total per group. I guess because I am using the next and previous functions in my formula, that it can't use sum on the same field. Is there some way using variables that I can create a counter.

Any help would be appreciated.

 
Use the 3 formula method:

Group header:
whileprintintingrecords;
numbervar GrpTot:=0;

Details level
whileprintintingrecords;
numbervar GrpTot:=GrpTotal+{your current formula};

Group Footer:
whileprintintingrecords;
numbervar GrpTot

-k
 
Thanks synapsevampire,

That gives me a running total all the way down. Is there a way I can reset the totals for each group.



 
It does reset the totals at each group level, hence the:

Group header:
whileprintintingrecords;
numbervar GrpTot:=0;

It does NOT provide a running toal.

Make sure that you have the group header formula in the group that you wish to reset and total on.

-k
 
Sorry, you were right. I forgot to put the :=0 in the Header formula. Hence why the total never reset.

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top