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

running total 1

Status
Not open for further replies.

klaidlaw

Programmer
May 28, 2008
140
US
I am using Crystal Reports 11 release 2 and I would like to put in a running total that will reset at every new page, how should I do this? Thanks for the help!!
 
You have to do this manually, by creating three formulas:

//{@reset} for the page header:
whileprintingrecords;
numbervar x := 0;

//{@accum} for the detail section:
whileprintingrecords;
numbervar x := x + {table.amt};// or 1

//{@display} for the page footer:
whileprintingrecords;
numbervar x;

-LB
 
Thank you that worked for the totaling, now I am trying to do the same thing now but counting instead of adding and I did the formulas like this:

//{@reset} for the page header:
whileprintingrecords;
numbervar y := 0

//{@accum} for the detail section:
whileprintingrecords;
numbervar y := y + count({table.amt});// or 1

//{@display} for the page footer:
whileprintingrecords;
numbervar y;

But it is not reseting, and the table.amt is a string. Thanks!
 
//{@accum} for the detail section:
whileprintingrecords;
numbervar y := y + 1;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top