SSRS页面拆分

时间:2017-07-06 13:25:39

标签: sql-server reporting-services

所以我在3个存储过程中执行while循环,然后将数据插入临时表,然后对它们执行联合,当我运行查询时它返回10个结果但是当我在SSRS中从中生成报告时只返回第一个结果并停止!不应该用其他结果制作多个页面吗?

declare @temptable table  ( id int )

while (select count(*) from customerid c left join @temptable t on c.id = t.id where t.id is null) > 0 begin

insert into @temptable select min(c.id)  from customerid c  left join @temptable t on c.id = t.id  where t.id is null

declare @id2 varchar(50) = (select max(id) from @temptable)

-- insert into temp tables here  
   exec DoctorsSDJs @id = @id2 
-- insert into temp table  
   exec LocationSDJs @id = @id2 
-- insert into temp tables  
   exec PatientSDJs @id = @id2

-- performing my union on the 3 tables

end

0 个答案:

没有答案