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!

Reset Running Total Field on Page Footer 1

Status
Not open for further replies.

isjorg

IS-IT--Management
Mar 20, 2007
15
BE
Hi,

I have a field in details that I and with this field I want to make a running total in the Page Footer. (!)

I cann't use a group but it has to reset the count after every page.

I've allready used Reset with a formula (x-2) reset on pagenumbre but then I get an error.
"An Error has occured on the server in attempting to access the data source"

thanks for helping me

jm
 
You should put formulas like these on the page:

//{@reset} to be placed in the page header:
whileprintingrecords;
numbervar cnt := 0;

//{@cnt} to be placed in the detail section (or whatever section(s) you are counting:
whileprintingrecords;
numbervar cnt := cnt + 1;

//{@display} to be placed in the page footer:
whileprintingrecords;
numbervar cnt;

-LB


 
Hi,

Like you, I'm trying to get a running total reset for each new page. I've tried the suggested formula, and yes, it counts the records. So i added a formula to the reset condition

{@Var3}=31

As Var3 is the variable name, and there are 31 records in a page.

But i get the error

A running total cannot refer to a print time formula

Any ideas??

thanks
 
Did you create formula fields like lbass suggested? Or are you using a running total field?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Hi,

I created the 3 formulas as described, and put them in the report as instructed. I then created a running total field for the cost field i want to total, using the Var3=31 as the reset formula.
 
I do not believe this is what lbass was getting at. Take his second formula and modify it to sum up your cost field:

whileprintingrecords;
numbervar cnt := cnt + {YourCostField};

Then the display formula will display the cost and reset on the change of page. No running total field is required.


Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Thanks to you both!!!

All now working. And my headaches gone!

Cheers again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top