Reporting Services is a great tool use, it easy to learn and can quickly generate nice looking reports. However when come to merging cells and can become quiet a nightmare. While I find that you can easy merge column cells but there are no option to merge row cells. I am too sure why they did not include this feature in the tool but I was very fortunate to find out a work around that produce a same affect as a row cells merge. The below image demonstrate a rows merge from a dynamic dataset.
To make it look like a rows merge first you need to remove the duplicate values on each row on the column you would like to generate the cell merge.
Use this code to remove the duplicate value on the detail field cell:
All this code does is comparing the previous value and the current value from the dataset. If the current row is the same as the previous row then don't display any value.
=IIF((Previous(Fields!Division.Value)=Fields!Division.Value) And (Previous(Fields!SystemView.Value)=Fields!SystemView.Value), "", Fields!Division.Value)
Next set the field border style to none and after that you have to set the top border style to either solid or none depends on whether the current row is same as the previous row. You will need to use expression to do this.
=IIF((Previous(Fields!Division.Value)=Fields!Division.Value) And (Previous(Fields!SystemView.Value)=Fields!SystemView.Value), "None", "Solid")
After you have done all this settings you should get a similar row merge effects.
Sorry, but it is not a real merge. You just hide the cells by visible properties, but unfortunately the cells are there. I need real merge.
For example there is three rows for "Mines - Tom Price & Marandoo" in the grid above. Imagine the case when we need to add a diagram column (after the Name column) and each Mines group has more than one row. We want to merge the rows in the new Diagram column, because the diagrams' height values more than one row.
How can we solve it?
Thank you.
|160.33.66.xxx
|2009-12-18 01:49:34
Rajkumar Reddy
- How to merge column cells in matrix report
Could you please explain how to merge column cells in matrix report..?
|139.173.54.xxx
|2010-01-07 20:18:49
Sreedhar Vankayala
- I used your technique - Thanks
I used your technique - Thanks
|199.198.251.xxx
|2010-01-22 14:15:26
Oliver
This is a good work around.
However, I haven't been able to figure out how to make the last record show the bottom line.
The columns to "merge" end up having the last record with out a bottom line.
How would the custom expression change to ensure the bottom line shows?
Thanks
|210.8.191.xxx
|2010-06-02 01:59:45
betty
- good
thanks for your sharing
|206.167.216.xxx
|2010-09-03 14:10:09
Ju
- How to display bottom line for last record
To show a bottom line after your last record, you can set the bottom border of the table to "Solid".
But... my problem is my table expands on more than one page. Setting the bottom border of the table to Solid will show a bottom line only for the last record of the last page. The bottom line will still be missing for the last row of each page.
Any idea how to solve this?
!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."