Its still not working;But I changed the stored procedure as like below
I don't understand why I am getting error at first select statement like "error converting datatype varchar to numeric"...
select DISTINCT SystemID,SystemName,'' as ProgramID,'' as ProgramName,'' as AdjustmentsSequenceNo,
'' as Paid,'' as Free,'' as Reduced,'' as paidamount,'' as freeamount,'' as reducedamount,'' as dollars
from [SchoolNutrition].[dbo].[vSystemSchool]
where schoolyear = @FiscalYear
UNION
SELECT SystemID,ProgramID,
CASE WHEN ProgramName='Meal' THEN 'Lunch' ELSE ProgramName END AS 'ProgramName',
AdjustmentsSequenceNo,sum(Paid) as Paid,sum(Free) as Free,sum(Reduced) as Reduced,sum(paidamount),sum(freeamount),sum(reducedamount),
sum(paidamount)+sum(freeamount)+sum(reducedamount) as dollars,'' as SystemName
from [SchoolNutrition].[dbo].[vDE107sForAllSystemsForOneMonth] SCH
--[dbo].[vSystemSchool] AS SS ON SCH.SchoolID = SS.SchoolId
where SCH.FiscalYear = @FiscalYear and SCH.ClaimMonth =@ClaimMonth
and AdjustmentsSequenceNo>=0
GROUP BY systemID,programID,ProgramName,AdjustmentsSequenceNo
order by AdjustmentsSequenceNo,SystemID,programID