如何合并 SQL Server Reports RDL 中具有相同值的行(特定列的)? [英] How can I merge rows (of a particular column) having the same value in SQL Server Reports RDL?
问题描述
我是在 BIDS 中使用 RDL 使用 SQL Server 2005 Reporting Servives 的新手.
I'm new to working with SQL Server 2005 Reporting Servives using RDLs in BIDS.
我需要修改现有报告,以便我可以合并相邻行中的单元格,这些单元格对于该特定列具有相同的值.
I need to modify an existing report so that I can merge cells in adjacent rows which would have the same value for that particular column.
例如:考虑这是从报告 RDL 使用的存储过程返回的表.
Ex: consider this is the table returned from the stored procedure used by the reports RDL.
_________________________________________________
Id SubCategory Field1 Field2 Total
_________________________________________________
1 a Bob US 17
1 b John UK 17
2 a Mary AUS 12
3 d Ram IND 19
4 b Alex UK 09
4 c Abby FR 09
5 e Tim IT 03
_________________________________________________
表格示例 - 无法格式化文本 :( 这里的图片:http_://i.stack.imgur.com/gWEH5.png_
Table Example - Couldn' Format Text :( Image here : http_://i.stack.imgur.com/gWEH5.png_
我需要做的是将单元格合并为一个,其中同一列中的两个相邻行具有相同的值.
What I need to do is I want the cells merged into one where two adjacent rows in the same column have the same value.
像 Id 1
重复两次,因此必须合并这些单元格.(还有4
)
Like Id 1
is repeated twice, so the cells for these must be merged. (Also 4
)
同样对于最后一列 Total
必须合并 Id 为 1
和 4
的单元格.
Similarly for the last column Total
for cells with Ids 1
and 4
must be merged.
RDL 有用于列的TextBox",我在这个论坛上看到了一些其他问题,但与 Tablix
或 Matrix 相关,所以我认为如果我提到它会更好.
The RDL has "TextBox" for columns, I saw some other questions in this forum but were related to Tablix
or Matrix, so I thought it would be better if I mentioned it.
我需要在 RDL 中完成此合并,并且在导出到 Excel 时也应该存在此合并.
I need this merging to be done in the RDL, and this should also be present when exported to Excel.
希望有人能尽快提供帮助.
Hoping someone will be able to help soon.
推荐答案
在 Reporting Services 中拖动 Id On Row 组的 Tablix 高于 Detail 组并将其他字段(总计除外)拖到表中 ID 和垂直虚线之前.并将 Total 拖到垂直虚线后的第一个单元格
in reporting services drag Id On Row group Of Tablix Upaer than Detail Group and drag other Fields(except Total) Besid ID and befor vertical dash line In the table. and drag Total to first cell afte vertical dash line
这篇关于如何合并 SQL Server Reports RDL 中具有相同值的行(特定列的)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!