I try to get data in this format
[{name: 'May',data: [3]}, {name: 'June', data: [3]}, {name: 'July', data: [14]}]
for this first i try this sp
ALTER procedure [dbo].[spsumdata]
as
Select distinct tblRv.OwnerName ,
DATENAME(MONTH,tblRe.StartDate) as [Month],
count(tblVv.VName)
as data
from tblRe
inner join
tblRv on tblRe.RID=tblRv.RID
inner join
tblVv on tblRv.ID=tblVv.MasterID
where tblRe.StartDate>=DATEADD(MONTH,-3,GETDATE())
AND tblRe.EndDate<=GETDATE()
and VName <> ''
group by tblRv.OwnerName,
DATENAME(MONTH,tblRe.StartDate)
order by tblRv.OwnerName
through above sp i get data like this
OwnerName Month data
JOHN July 14
JOHN June 3
JOHN May 3
now i try this web-method like this in this web-method i call store procedure which is spsumdata .. but i am confuse how i get month in format which i mentioned above .. there is no month column in table
public static string summarydata()
{
string sumry = "[";
try
{
T1 sd = new T1();
// var b= sd.mon
spsumdata_Result sum = sd.spsumdata()
sumry += "]";
return sumry;
}
catch(Exception)
{
throw new Exception();
}
}
any solution?