Report Builder 3.0 - Merging cells vertically in a table

  • I am trying to create a table with some cells merged vertically. The table is static, and is therefore not expected to grow with the incoming data. I have set the dataset for the table to be a dummy dataset that just creates one row with no content (select ''). I am going to get data into one cell in each of the rows by using separate datasets per row doing individual calls to the database, therefore my expression for each would be =First(Fields!MyField.Value, "DataSet1"), or "DataSet2", etc. The rest of the cells in each row (to the left of the data value) will each contain static, known values, as row headers.

    For some of the row headers, say for rows 2 and 3, I am needing to merge the first cells vertically and the third cells vertically. The second and fourth columns will not be merged. Although this is not a standard way for Report Builder 3.0 to be used, this is definitely a standard form for my industry, and cannot really be changed. And I have been tasked with replicating this in RB3.

    So, as a very simple example, I might have four rows with four columns looking like this:

    Exercise110 miles3 secs<Data from DataSet1>

    Exercise220 miles5 secs<Data from DataSet2>

    Exercise230 miles5 secs<Data from DataSet3>

    Exercise340 miles4 secs<Data from DataSet4>

    So Exercise1 will not be merged, the first and third cells of each row for Exercise2 will be merged, and Exercise3 will not be merged. It should look like this, in table layout:

    Exercise110 miles3 secs<Data from DataSet1>

    Exercise220 miles5 secs<Data from DataSet2>

    30 miles<Data from DataSet3>

    Exercise340 miles4 secs<Data from DataSet4>

    Does anyone have any advice on how to merge these cells vertically. I have tried this table a number of ways, and layout has not been good. I looked at the Microsoft doc page (http://msdn.microsoft.com/en-us/library/dd239384(v=sql.110).aspx), and under the section labeled "Controlling the Appearance of Data", there's a bullet point labeled Merging Cells that explicitly states:

    "Multiple contiguous cells within a table can be combined into a single cell. This is known as a column span or a cell merge. Cells can only be combined horizontally or vertically."

    So supposedly I can do the vertical merge, but I haven't figured out how.

    I have tried selecting cells vertically, even when they belong to rows that are of the same group, and when I right-click the Merge Cells option doesn't show up, as it does when I select cells horizontally and do the same thing. I have looked further into the online documentation but haven't yet found a place where they explain what I'm doing wrong.

    Any help on this would be highly appreciated.

  • Well, I was really hoping someone had a suggestion for me here. What I ended up doing was creating an outer table, and, for rows that had vertically spanning cells, I used only one row, merged all cells horizontally that didn't span vertically, and placed tables with as many rows as I needed so that the one cell which in the report spans vertically is represented by a single cell in the outer table, but the inner tables make it look like to its right and left there are two to three rows associated with it. I was able to do this because of the fact this is a statically defined table, always the same height, and the decision had already been made (not my decision) to make separate datasets for each row of the table.

    So that works. Each row of the table makes a string reference to First() of the dataset it's using (since there's only one row returned from any of these datasets, that's fine). The web rendering is much better in this case than without the outer table.

    Now I'm running into alignment issues within the table defined. Any table that has tables inside of it has rows in the web rendering that push out further to the right and those that push out a few pixels less to the right. Turns out that it's the rows that weren't merged and fitted with inner tables that are slightly wider than those that were.

    Also, for those rows that were merged and fitted with an inner table, their columns in the web rendering push down a pixel or so less than those that weren't.

    I've been able to reduce some of these differences by turning off some borders. Wherever, in the line of extra growth, I see two cells sharing an inner border (a light gray border inside the table boundaries) I choose one of them to turn off. Turns out that turning off the one in the cell belonging to the inner table seems to be the better choice.

    This has helped some too, but now I have some gaps in the web rendering between cells where the border from the adjacent cell doesn't quite reach and touch this cell's border. And there's still some extra growth in rows mostly, but also in columns.

    Quite maddening this. I continue to look at it, but I'm not really sure how to fix it. Any ideas guys? Right now I need a miracle to fix this thing.

    P.S. - the print rendering continues to be perfectly ok.

  • I would say that you've posted this in the SSAS bit of the forum not the Report Builder/Reporting Services bit. You might get more response there

    Mack

  • Thanks Mack

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply