on 01-14-2011 3:46 PM
hi all,
this is the continuation of my question located at
now for my question about the Cumulative Balance. when we run bp account balance in SBO let say the date range is from 12/1/2010 - 1/14/2011(today), in the column cumulative balance there is an OB in the 1st row. how will i get this amount using crystal reports.
please help.
Fidel
Something like this:
SELECT
T1.ShortName,
SUM(T1.Credit - T1.Debit) 'Open Balance'
FROM OJDT T0
INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId
WHERE T1.ShortName = '[%0\]' and t0.RefDate <= '[%1\]'
GROUP BY T1.ShortName
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Gordon,
i have pasted your code to the crystal report command and created 2 parameters (BPNumber, OBDate respectively) when ask to enter values i enter the ff. values
BPnumber = V0078
OBDate = 12/1/2010
but i got this error,
Failed to retrieve data from the database
Details: ADO Error code:0x
Source: Microsoft OLE DB Provider for SQL Server
Description: Invalid column name 'V0078'
SQL State: 42s22
Native Error: [Database Vendor code: 207]
thanks
fidel
hello Gordon,
thanks a lot, it works this time., but i use you previous post to get directly the sum of Credit-Debit, i have figured out what was my wrong and causes the error above. ill post my solution for for the others that may face the same error i have.
for the date Parameter is {?ParamName} without single quote
for the string parameter is '{?ParamName}' with single quote.
best regards,
Fidel
Hi Fidel,
This OB is calculated from the first transaction posted to the account until the date you need OB.
You need another query as command for this OB amount.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.