report service如何使用存储过程
declare @sql nvarchar(4000)set @sql='Select 姓名,年,周'Select @sql=@sql+',sum(case when 类型='''+类型+ ''' then Total else 0 end) As '''+类型+'''' From 表名 Group By 类型Print @sqlset @sql=@sql+' From 表名 Group By 姓名,年,周'Print @sqlexecute sp_executesql @sql