sql - Actual vs Budget variance crystal report sap repeating columns -


i new crystal reporting . trying join multiple tables have working queries when try add them in sap cr editor . 1 of column shows fine others start repeating values.

i using following tables

budget a/c code --oact, accname -- budget relevant a/c name

current month actual -- ojdt join jdt1 -- pick je

current month budget -- obgt join bgt1-- pick budget

current month variance -- jdt1 - bgt1 -- difference b/w current month actual , current month budget

year date actual -- sum of jdt1 -- total pnl balance current fiscal year

year date budget -- sum of bgt1 -- total budget balance current fiscal year

year date variance --actual - budget --difference b/w year date actual , year date budget

report format list of columns want display .

account names

current month actual

current month budget

current month variance

year date actual

year date budget

year date variance

what have done

    select     sum (t1.debltotal) actual,     sum(t3.debit) budget,     **oact.acctname ?**          obgt t0  inner join bgt1 t1 on t0.[absid] = t1.[budgid],      ojdt t2 inner join jdt1 t3 on t2.[transid] = t3.[transid]      group t3.account  -- how want join oact account names acctname                           -- field of budget relevant accounts join on acctcode field 

finally have completes portion

select    t3.[acctcode],sum(t1.[debit]) actual, sum(t5.[debltotal]) budget   #abc       [dbo].[jdt1]  t1 inner join [dbo].[ojdt]     t2 on t1.[transid] = t2.[transid] inner join    oact t3 on t1.[account] = t3.[acctcode], obgt t4    inner join bgt1 t5 on t4.[absid] = t5.[budgid]    group t3.acctcode    select oact.acctname, #abc.actual, #abc.budget   oact ,#abc #abc.acctcode=oact.acctcode     drop table #abc 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -