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

Trouble with resetting conditional running totals

Status
Not open for further replies.

TerriO

Technical User
Jan 9, 2002
84
US
EVALUATE
I am having trouble resetting the conditional running totals for my report for my groups. Its only giving me the total for the page and not the entire group.

Below is what I am using for my conditional running total
EVALUATE
WhilePrintingRecords;
CurrencyVar RunningTotal;
If (OnFirstRecord or {V_UNION_ALL_LOANS.LOAN_ID} <> Previous({V_UNION_ALL_LOANS.LOAN_ID})) then
RunningTotal := RunningTotal +
{V_UNION_ALL_LOANS.LOAN_AMOUNT}

Initialize GH
whileprintingrecords;
currencyvar runningtotal := 0

display DETAILS
WhilePrintingRecords;
CurrencyVar runningtotal ; Terri Mimbs
 
If you are repeating the group header at the top of each page, which mny users request for readability, this is exactly what WILL happen. A group header comes along a reinitializes the variable. To get arouind this, change your Initilize GH formula to:

Not OnRepeatedGroupHeader
whileprintingrecords;
currencyvar runningtotal := 0



Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
Thanks, that seems like the logical thing to do and I never would have noticed that, but I keep getting the error
&quot;A number, currency amount, boolean, date, time, date-time, or string is expected here&quot; I have tried to manipulate the initialize several different ways and the error keeps coming up.
Terri Mimbs
 
Hi !

Try &quot;InRepeatedGroupHeader&quot;
(instead of &quot;OnRepeatedGroupHeader&quot;)

/Goran
 
I stand corrected :) Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top