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

Balance like bank statement?

Status
Not open for further replies.

ddnh

Programmer
Nov 25, 2002
94
US
I am trying to create a report that essentially performs like a bank statement. how do I make the balance field in the detail section change with each transaction?

I'm using CR 9. I have the report grouped on TrnDate. The details have date, amount, and balance. I want the balance to be the starting balance plus the trans amt, the next record should be the new balance plus the new trans amt.

Header: {balance} (starting balance)
Group: TrnDate (supressed)
Detail: {TrnDate} {TrnAmt} {????} (running balance)

what I want

Header: $10.00 (starting balance)
Detail: 5/1 $10 $20
Detail: 5/1 $5 $25
Detail: 5/1 $10 $35
Detail: 5/2 $-10 $25
Detail: 5/2 $25 $50
Detail: 5/3 $-5 $45


Any idea how I do this?





 
I found the solution...

To use Basic Syntax to create a manual running total, create three formulas similar to the following:

FORMULA 1: @Rtotal1 (in header)

'This formula initializes and resets
'(if necessary) the running total variable
Shared x as number
x = 0
formula = x

FORMULA 2: @Rtotal2 (in detail)

'This formula increments the running total variable.
Shared x as number
x = x + 1
formula = x

FORMULA 3: @Rtotal3 (in footer)

'This formula displays the final
'value of the running total variable.
Shared x as number
formula = x


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top