shivareddyk Posted July 6, 2009 Share Posted July 6, 2009 hi ..... I am writing query like this for calculating monthly wise data values.select x.*,y.Impairment from (SELECT a.finyr, a.finpr,b.grptyp,sum(case when b.grptyp = 'PL1' then locbal else 0 end) TotalIncome,sum(case when b.grptyp='PL2' or b.grptyp='PL3' then locbal else 0 end) TotalExpenses,sum(case when b.grptyp = 'PL4' then locbal else 0 end) Taxation,sum(case when b.grptyp = 'BSS' then locbal else 0 end) Equity FROM D_S_GL06MAST a, D_S_GL04SGSTR bWHERE a.compcd = b.compcdAND a.glkey = b.glkey and a.finpr=$P{reportdate} group by finyr,finpr) x,(SELECT a.finyr, a.finpr, sum(locbal) Impairment FROM D_S_GL06MAST a, D_S_GL04SGSTR b, S_CF92PRGL cWHERE a.compcd = b.compcdAND a.glkey = b.glkeyAND b.accd = c.glcdAND b.fccd = c.fccdAND c.crline = 'LN'AND c.glfld IN ('GL11', 'GL37', 'GL38', 'GL50', 'GL51')and a.finpr=$P{reportdate} group by finyr,finpr) y where x.finyr=y.finyr and x.finpr=y.finprthat works fine,give result asour input as 1 it gives January data 2 it gives February data, BUT........I need cummulative data......i put in i-reports settings "sum" in calculation type.but i did not get u cummulative data,any one can help for me...... Thanks in advance.... shiv a Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now