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

Calculating balance in invoice report 1

Status
Not open for further replies.

akshit

Technical User
Feb 9, 2001
5
US

Hi there,

In the report called Invoice_payments, I created a function called Difference amount found in the class module of the report to display the balances, For the same Invoice sent but for the different payments made at different periods, it gives me a zero. But the problem occurs in the group when there is different invoice sent, does'nt give me correct balance.

For eg,

invoice number= 100,
invoice_date = 2/10/2000
client = xerox
Invoice amount = 1000
First payment period = 500
Second payment period = 500

First balance = 500
second balance = 0
but in the group. If I have another invoice with different invoice_number for the same client, balance then gives me error.

eg

Xerox

Invoice_number: 134
invoice_amount 5000
paymentamount 1000

Gives me 3000 instead of 4000


I have tried coding in different ways but it did'nt help me.

Give me suggestions.
Help me with the code


Thanks a lot in advance
Satya

 
it sounds like your code is doing its calculations based on the client name.
you should have the calculations be done based on the invoice numbers....
i usually make an hidden variable in the report itself, then use the sorting and grouping to determine which records should be included in the calc. then call the hidden variable from another text box....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top