seeding a Running Sum field property

atrium

Registered User.
Local time
Today, 17:19
Joined
May 13, 2014
Messages
348
I don't have any problems using the 'running sum' property
But I'm having trouble trying to initiate the running total field with a opening balance. I have introduced the Opening Balance and displayed it in the header and called it OpeningBalFld.

I have a CR, DR and a Balance heading in the header section. In the detail line I have the three fields Deposits (positive) under CR, Withdrawals under Dr (the Debit field is a negative - reducing the balance)

Under the Balance heading I have a field called AdjustedBalFld that I want to show the running sum adjusted by the Opening Balance entered by the user.

The field that I want the system to keep a running sum is called RunningBalFld and it is not visible.

The field under the Balance heading (AdjustedBalFld has a formulae = OpeningBalFld + RunningBalFld

The problem is that the AdjustedBalFld is not calculating properly. it bears no relationship with the calculation after the first detail line.
The other fields are fine.


Can anyone help please

Atrium
 
can you use the reports events:
on reports load event, set the adjustment balance to opening balance:

private sub report_load()
me.adjustedBalFld = me.OpeningBalFld
end sub

on the detail's print event, do the calculation

private sub detail_print(Cancel As Integer, PrintCount As Integer)
me.adjustedBalFld = me.adjustedBalFld + mr.cr - me.dr
end sub
 
Thanks Arnelgp, I'll give that a shot

Regards

Atrium
 
Thanks Arnelgp, worked perfectly

Thanks again
 

Users who are viewing this thread

Back
Top Bottom