on 10-05-2008 4:32 PM
How to get by Crystal report the BP balance ? if I get column balance it's not true.
Giuseppe
Hi Giuseppe,
The JDT1 table contains all the information you need to calculate the current balance for a BP. The ShortName field will contain the BP Code for any transaction type posted against the BP.
For example, the following query will return the balances for all BPs:
select
T0.CardCode, T0.CardName, T0.CardType,
isnull(sum(T1.Debit - T1.Credit), 0) as Balance
from
OCRD T0
left outer join JDT1 T1 on T0.CardCode = T1.ShortName
and T0.CardType in ('C', 'S')
group by
T0.CardCode, T0.CardName, T0.CardType
Kind Regards,
Owen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.