问题描述
我想根据数据集列值在 tablix 控件中创建空行.
I want to create blank rows in tablix control based on dataset column values.
例如.|col1,col2,col3 |1 A 3 |2 乙 2 |3 C 5 |
ex. |col1,col2,col3 | 1 A 3 | 2 B 2 | 3 C 5 |
我的 tablix 应该显示这样的报告列 1, 列 2|1 安---------(空行)------------------|2 乙------------------ |
My tablix should display report like this col1, col2 | 1 A --------- (Blank rows) --------- ---------| 2 B --------- --------- |
像这样我必须根据列值在 tablix 中创建空白行.请帮帮我.
Like this i Have to create blank rows in tablix based on column value. Please help me out.
推荐答案
在 col1(或任何唯一/pkey col)上创建一个行分组,然后右键单击 tablix 行并在下面的组内添加一行...你可以根据您的使用/要求合并插入的行
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
这个报告应该有一个整数类型的参数...取一个空行的 tablix(根据要求的列数)
this report should have one integer type parameter... take a tablix with empty row (number of columns as per requirement)
现在返回原始报表..在空行中插入子报表(插入组内)设置使用空tablix创建的子报表..传递来自col3的参数信息.
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.
当 col3 值为 3 时它会做什么...子报表将生成 3 个空行 &很快..我希望你理解我试图解释的方式.
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.
这篇关于SSRS - 我想在 tablix 控件中插入空白行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!