当前位置: 代码迷 >> Sql Server >> report service怎么使用存储过程
  详细解决方案

report service怎么使用存储过程

热度:78   发布时间:2016-04-27 17:09:57.0
report service如何使用存储过程
SQL code
declare @sql nvarchar(4000)set @sql='Select 姓名,年,周'Select @[email protected]+',sum(case when 类型='''+类型+ ''' then Total else 0 end) As '''+类型+''''     From 表名 Group By 类型Print @sqlset @[email protected]+' From 表名 Group By 姓名,年,周'Print @sqlexecute sp_executesql @sql


以上结果如何使用report service调用

------解决方案--------------------
新建好存储过程,然后再报表工具中添加数据集(数据库的连接),在选择存储过程就行了啊
  相关解决方案