SSRS - I want to insert blank rows in tablix control

丶灬走出姿态 提交于 2019-12-11 20:21:58

问题


I want to create blank rows in tablix control based on dataset column values.

ex. |col1,col2,col3 | 1 A 3 | 2 B 2 | 3 C 5 |

My tablix should display report like this col1, col2 | 1 A --------- (Blank rows) --------- ---------| 2 B --------- --------- |

Like this i Have to create blank rows in tablix based on column value. Please help me out.


回答1:


Create a row grouping on col1 (or any unique/pkey col) and then right click on tablix row and add a row inside group below ... you can merge the inserted row according to your use/requirement

Based on your requirement.. you have to create a separate report bind that to result set of stored procedure

CREATE PROCEDURE GETNUMNER(@N AS INT)
AS
BEGIN
      DECLARE   @Numbers TABLE
      ( 
             Number INT IDENTITY(1,1) PRIMARY KEY CLUSTERED 
      ) 

      WHILE COALESCE(SCOPE_IDENTITY(), 0) < @N 
      BEGIN 
             INSERT @Numbers DEFAULT VALUES 
      END   
      SELECT * FROM @Numbers
END

this report should have one integer type parameter... take a tablix with empty row (number of columns as per requirement)

now go back to original report.. insert a subreport in empty row (inserted inside group) set the subreport which create with empty tablix.. pass the parameter information from col3.

what it will do when col3 has value 3.. subreport will generate 3 empty rows & so on.. I hope you understand the way i tried to explain.



来源:https://stackoverflow.com/questions/26839125/ssrs-i-want-to-insert-blank-rows-in-tablix-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!