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

Running Total on Preexisitng %age formula

Status
Not open for further replies.

mycrystalbaby

Programmer
Jun 16, 2005
42
US
I have a formula where I am calculate the %age

Used/total*100
I am using this formula on the group footer 2b; I would like to show the grand total of this on Group Footer1
e.g
GF2b

GF2b 1.2%
GF2b 2.4%
Grand total
GF1 ??

I am trying to create a running total out of this formula, but not able to do. Quick help would be highly appreciable.
 
You could do this with a variable:

//{@reset} to be placed in the group #1 header:
whileprintingrecords;
numbervar sumpct;
if not inrepeatedgroupheader then
sumpct := 0;

//{@accum}:
whileprintingrecords;
numbervar sumpct := sumpct + {@yourpercent};

//{@display} to be placed in the GF#1:
whileprintingrecords;
numbervar sumpct;

-LB
 
I tried this, it did not work.
It is giving me the first value always
e.g if I have 10 values in %age, it picks up the ifrts one and displays that in footer
 
{@accum} should be placed in the GF2b. Please try again and if it doesn't work, report back exactly what you did, showing the exact formulas.

-LB
 
Thank you so much, I placed it at the right footer and it worked.
Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top