Hi Experts
actually am given in format of one year but i need financial year format i,e 2014-15 means start with April 2014 to march 2015
How am new to SAP B1 and Crystal report and also i need to parameter of year as like 2014-15
This Is my query ...........Help me out of this guys
SELECT [year] as year,[CustName] as CustName,
[4] as Apr,
[5] as May,
[6] as June,
[7] as July,
[8] as Aug,
[9] as Sept,
[10] as Oct,
[11] as Nov,
[12] as Dec ,
[1] as Jan,
[2] as Feb,
[3] as Mar
From (Select T0.CardName as CustName, (T1.LineTotal) as Total, month(T0.[DocDate]) as Month,SUBSTRING(CONVERT(nvarchar,T0.[DocDate],112),0,5) as year From dbo. OINV T0
inner join INV1 T1 on T1.DocEntry=T0.DocEntry
inner join OLCT T2 on T2.Code=T1.LocCode and T2.Code='4'
)S
Pivot (sum(Total) FOR month IN ([4],[5],[6],[7],[8],[9],[10],[11],[12], [1],[2],[3]))
P order by [CustName],year
end