Hi Joe,
I have written in our report following formula which works for us as far as I know.
Please try something like this
SELECT
B.PAprjclsid ,
isnull(ICSL.ITMCLSDC,''),
0,
A.PA_ProjAmt__LossTest -A.PA_ActualRecogRev__LossT+A.PAPrevLossAmount-A.PAPrevBIEEAmount,
A.PA_ProjAmt__LossTest -A.PA_ActualRecogRev__LossT+A.PAPrevLossAmount-A.PAPrevBIEEAmount,
JRNENTRY,
SEQNUMBR,
GLT.ACTINDX,
substring(COA.actnumbr_1, 1, len(COA.actnumbr_1)) + '-' + substring(COA.actnumbr_2, 1, len(COA.actnumbr_2)) + '-' + substring(COA.actnumbr_3, 1, len(COA.actnumbr_3)) + '-' + substring(COA.actnumbr_4, 1, len(COA.actnumbr_4)) as Account,
REFRENCE,
GLT.TRXDATE,
TRXSORCE,
ORGNTSRC,
ORDOCNUM
FROM GL20000 GLT
LEFT OUTER JOIN GL00100 COA ON COA.ACTINDX = GLT.ACTINDX
LEFT OUTER JOIN PA33302 A ON A.PADocnumber20 = GLT.ORDOCNUM
LEFT OUTER JOIN PA01201 B On B.PAPROJNUMBER = A.PAPROJNUMBER
LEFT OUTER JOIN IV40400 ICSL ON B.PAprjclsid = ICSL.ITMCLSCD
WHERE ORGNTSRC LIKE 'PA%'
AND COA.ACTNUMBR_1 LIKE '3%'
--AND GLT.JRNENTRY = 144609
AND A.PA_ProjAmt__LossTest -A.PA_ActualRecogRev__LossT+A.PAPrevLossAmount-A.PAPrevBIEEAmount <> 0
This will give you revenue amount with project class ID.
This might help
Thanks,
Hatim