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

Resetting Formulas by Page Number 2

Status
Not open for further replies.

bmacdo

Programmer
Feb 14, 2008
74
0
0
US
Reporting with Crystal v.10, off MS-SQL Server data ...

I have a spreadsheet I am to duplicate that calculates for each row a dollar amount from the number of days a student is in one of our facilities w/in a prompted date range & multiplied by a dollar constant.

My difficulty is I need a page total that is the total for that page only. Seems like it should be simple, but I can't figure out how to reset the formula to zero upon page break. Would have liked to create a page formula of my own, but can't group by that as it would have to be set whileprintingrecords. Thought of using a running total, but as the sum is based on a runtime formula, not a field, couldn't.

Any help would be appreciated.

Brad M.
 
Create three formulas:

//{@pagehdrformula}:
whileprintingrecords;
numbervar pgsum := 0;

//{@accum} to be placed in the section containing the numbers you want to summarize:
whileprintingrecords;
numbervar pgsum := pgsum + <field/calc to sum here>;

//{@pagefooterformula}:
whileprintingrecords;
numbervar pgsum;

-LB
 
Thank you very much again. Worked beautifully.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top