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

Summary field! 1

Status
Not open for further replies.

VenkatY

Programmer
Apr 24, 2000
15
US
Hi guys,
I need some help on how to make a sum of field by page.
Ex:
A report has Salary fieldi in detail section. Want to show the total or sum of Salary by Page.


I tried to create the formula of
Sum({Table1.Salary},pagenumber)

but it is giving an error.


Can any one know how to do this, Please help?

thanks
Venkat
 
The famous "3 formula" approach to the best way to solve this. In the page header, create a formula like:
//This resets the SalarySum to zero every page
WhilePrintingRecords ;
Global NumberVar SalarySum := 0 ;
In the detail section, create a formula like:
//This creates the page total for Salary Sum
WhilePrintingRecords ;
Global NumberVar SalarySum ;
SalarySum := SalarySum + {Table1.Salary} ;
In the page footer, create a formula like:
//This displays the page total for Salary Sum
WhilePrintingRecords ;
Global NumberVar SalarySum ;
Suppress the first two formulas - they are used for calculation purposes only.
Malcolm
 
Thanks..Malcolm for the help..
It worked well.

-venkat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top