|
I have a report that summarizes debit amount and credit amount branchwise(GH1) and calculate the balance and show it in debit column if balance is greater than 0 or in credit column if balance is less than 0. If balance is 0 it suppress the group
I guess I m preety clear till here.
The report has two level of grouping Account Head wise and then branchwise. That means a Account Head named "AC1" may have sub groups like Branch1,Branch2 and Branch3. To be more clear look at the table below:
Transaction AccountHead Branch Description Debit Credit
------------------------------------------------------------------------------
1 AH1 Branch1 mydescription 3000 0
2 AH1 Branch1 Desc2 200
3 AH1 Branch2 mydestion 5000 0
4 AH1 Branch2 Descasfasd2 5000
5 AH1 Branch3 asdfasd2 4800
6 AH1 Branch3 Dasdffasd2 4800
5 AH2 Branch1 scription 15000 0
6 AH2 Branch1 Desc2 3000
7 AH2 Branch2 scription 4500 0
8 AH2 Branch2 Desc2 10000
9 AH2 Branch3 scription 500 0
10 AH2 Branch3 Desc2 7000
11 AH3 Branch1 scription 5000 0
12 AH3 Branch1 Desc2 5000
13 AH3 Branch2 scription 5500 0
14 AH3 Branch2 Desc2 5500
15 AH3 Branch3 scription 500 0
16 AH3 Branch3 Desc2 500
Here I m trying to clarify the three different ways how the records might be generated. Now without any complexity or suppression My report would look like this
AccountHead Branch DebitBalance CreditBalance
=======================================================================
AH1
Branch1 2800
Branch2 4500
Branch3 0 0
..............................................................
AH1 Total 0 1700
AH2
Branch1 12000
Branch2 5500
Branch3 6500
..............................................................
AH2 Total 0 0
AH3
Branch1 0 0
Branch2 0 0
Branch3 0 0
..............................................................
AH3 Total 0 0
I think I m much clearer now.
Now my final report should look like this
AccountHead Branch DebitBalance CreditBalance
=======================================================================
AH1
Branch1 2800
Branch2 4500
..............................................................
AH1 Total 0 1700
AH2
Branch1 12000
Branch2 5500
Branch3 6500
..............................................................
AH2 Total 0 0
Here you can see that in AH1, Branch3 is suppressed as there is no balance. and AH3 is totally suppressed as there is no branch with balance. And in AH2 even though total Account head balance is nill it is still shown as balance under branches exists.
AH1 has no problem but the problem is in AH2 and AH3. to suppress the Account head group header and footer i checked if AH balance is 0 or not. If 0 suppress else don't suppress.
But when i did that it affected AH2 as Account head header and footer cannot be suppressed even though the Account head balance is nill as it's sub group branches still have balances left.
Can any one tell me how to summarize the balance of each branches in Account head footer so that i can check if debit balances and credit balances are 0 then suppress the Account head header and footer else don't suppress.
Can anyone solve my problem here. It can be solved if there is any way to summarize the balances of each branch account head wise.
Thanks in advance.
|