问题
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.
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  
_________________________________________________  
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.
Like Id 1 is repeated twice, so the cells for these must be merged. (Also 4)
Similarly for the last column Total for cells with Ids 1 and 4 must be merged.
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.
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.
回答1:
Change the SQL query to use a group by on ID.
回答2:
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
来源:https://stackoverflow.com/questions/11452140/how-can-i-merge-rows-of-a-particular-column-having-the-same-value-in-sql-serv