【发布时间】:2020-01-03 08:03:00
【问题描述】:
【问题讨论】:
标签: .net visual-studio report ssrs-2008 rdlc
【问题讨论】:
标签: .net visual-studio report ssrs-2008 rdlc
假设您无法更改存储的过程(如果可以,那么您可以直接在其中进行这项工作)。
DECLARE @RowWidth int = 5
CREATE TABLE #t (GroupLabel CHAR(1), SeatLabel int)
INSERT INTO #t EXEC myStoredProc
SELECT
GroupLabel, SeatLabel
, CEILING((SeatLabel -1) / @RowWidth) AS SeatRow
, (SeatLabel - 1) % @RowWidth as colGrp
FROM #t
如果您的存储过程产生了 20 个结果,A 1-10 和 B-10,那么结果将如下所示。
添加一个矩阵控件,然后按 GroupLabel 和 SeatRow 分组为行组,然后在 colGrp 上添加一个列组。
最终的报告设计看起来像这样(表达式只是将 GroupLabel 和 SeatLabel 连接起来。(=Fields!GroupLabel.Value & Fields!SeatLabel.Value)
最后的输出是这样的
它不是 100%,但稍微格式化一下应该足够接近。
【讨论】: