-
Nov 21st, 2019, 11:30 AM
#1
Thread Starter
Fanatic Member
How to calculate balances at runtime with Dr/Cr
Hi
I have below report & i want to calculate Balances with Dr/Cr. How it can be calculated by Formula. On Change of Account No group reset to 0
Code:
Account Name DocumentNo DocumentDate Narration Debit Credit Balance
1 Loan Opg. Balance 0 15200 Cr
11 01-10-2019 By Loan - 011 6013
12 14-10-2019 By Loan - 210 0 4000
2 Cash Opg. Balance 0 0 Cr
14 14-10-2019 By Cash 0 35999
Thanks
-
Nov 22nd, 2019, 10:10 AM
#2
New Member
Re: How to calculate balances at runtime with Dr/Cr
Need more information. Please provide your code
-
Nov 22nd, 2019, 11:04 AM
#3
Re: How to calculate balances at runtime with Dr/Cr
Well, the balance is the sum of all credits minus the sum of all debits ... normally I'd sum(credit) - sum(debit) group by (account) ... but you have holes in your data... so....
-tg
-
Nov 22nd, 2019, 11:39 AM
#4
Thread Starter
Fanatic Member
Re: How to calculate balances at runtime with Dr/Cr
Hi
Above data received through Stored Procedure
I want in Document No 11 it should show balance as 9187 Cr
In Document No 12 it should show balance 13187 Cr
In Document No 14 balance should be 35999 Cr
Thanks
-
Nov 22nd, 2019, 11:47 AM
#5
Thread Starter
Fanatic Member
Re: How to calculate balances at runtime with Dr/Cr
Hi
Above data received through Stored Procedure
I want in Document No 11 it should show balance as 9187 Cr
In Document No 12 it should show balance 13187 Cr
In Document No 14 balance should be 35999 Cr
Thanks
-
Nov 22nd, 2019, 11:54 AM
#6
Re: How to calculate balances at runtime with Dr/Cr
1) That's not quite what you asked for. What you're looking for is the Running total. Not the balance.
2) Do it inside the stored proc. The data is there, you're already doing half of the calculations there, just finish it off.
-tg
-
Nov 22nd, 2019, 10:20 PM
#7
Thread Starter
Fanatic Member
Re: How to calculate balances at runtime with Dr/Cr
Hi Techngome
Through Stored Procedure i am able to do . But i want to know how it can be done thru Running Total or Formula .
Thanks
-
Nov 22nd, 2019, 10:21 PM
#8
Thread Starter
Fanatic Member
Re: How to calculate balances at runtime with Dr/Cr
Hi Mighty
Hi
Above data received through Stored Procedure
I want in Document No 11 it should show balance as 9187 Cr
In Document No 12 it should show balance 13187 Cr
In Document No 14 balance should be 35999 Cr
I am able to do thru Stored Procedure but i want to know how it can be done thru Running Total or Formula.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|