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 strongm 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 on a new page 2

Status
Not open for further replies.

AdamRicko

Technical User
Feb 19, 2009
97
GB
Hi All,

As the title sais, is their a formulae so a running total will reset on every page? I have tried a few different things but have been unable to get this to work.

Any help regarding this matter would be greatly appreciated.

Many Thanks,

AR

CR2008 - SQL server 2005

New CR User
 
Hi

Create two formulas

//Place this in the details area:
Whileprintingrecords;
numbervar x:=x+1

//Place this in the page footer:
whileprintingrecords;
numbervar x:=0

Gordon BOCP
Crystalize
 
Hi,

That works a treat for a running total page reset, but is not exactly what im looking for.

Im trying to conditionaly show "^ Whilst stocks last" in my page footer if "^" is shown on current page. "^" is in its own field.

See below for what im currently doing.

Formulae to show "^". {@While Stock Lasts}

IF {Trade_Price_List.Attribute} like "*W*" then "^" Else " "



Running Total. {#Whilst stocks last} Type of Summary: Count

Summarizing on {Trade_Price_List_attribute}


Evaluating using a formulae

{@While Stock Lasts} = "^"

Reset
(need to be reset by page (i think). if i reset by group, the footer formulae wont pick it up)


Footer Formulae {@While Stock Lasts footer}

IF {#Whilst stocks last} = 1 then "^ Whilst stocks last" else " "


Hope this helps, if you require any more information please just ask.


Many Thanks,

AR


CR2008 - SQL server 2005

New CR User
 
AS Gordon said

Replace your RT with a variable formula

Whileprintingrecords;
numbervar x;

if {@While Stock Lasts} = "^"
then x:=x+1

Reset in page footer and/or groupheader as required

Then in footer

whileprintingrecords;
IF numbervar x = 1 then "^ Whilst stocks last" else " "

Ian


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top