8

I am working on a new RDLC report (as part of a WinForms application) and I need to have the report take a simple table (6 columns of simple data), and for each row in the table, display a box that contains that data, but arranged such that the first two "rows" in that box consist of first an image (two "cells" merged vertically) and then two values (above each other - each on their own "row"). Then it needs to include 3 values (as separate "rows" as wide as the entire box (i.e. merging the two cells horizontally)

And it needs to repeat that entire box for every row of data.

How can I accomplish this, given that it includes both horizontal and vertical merging of cells (and I'm not sure how to do that in either a table or matrix in the RDLC)?

Here is a mock-up of this, to better show what I need:

Mock-Up

C-Pound Guru
  • 15,967
  • 6
  • 46
  • 67
Scott
  • 123
  • 1
  • 1
  • 7
  • Yes and no - I looked at that question before I posted, and while it gives some ideas for the horizontal merging that I need, it doesn't give me the vertical merging as well. – Scott May 19 '15 at 19:31

4 Answers4

5

I found a solution on this page

By the default, a single row header is created when adding a grouping or field in a Tablix. In order to merge two cells of two rows in a column, try the following steps:

Note: The following will only work if the "Row Header was generated by adding a parent or child group". If this was just dragged from a dataset, you will never see the merged cell option.

  1. Insert a row above the single row header (again this is grouping header). The original header at this point will be in the second row.
  2. Select the adjacent cells vertically (e.g. two cells of two rows in a column) by using pressing Ctrl key and Clicking on the Cell. The selection should be highlighted by a dark grey thick border around the edges.
  3. Right-Click on your selection in the whitespace area, you should "Merge Cells" in the popup menu. Select "Merge Cells".
  4. The two adjacent vertical cells are merged at this stage. You need to write label text again as the merging will erase it. To center the text, you can just press enter first and normally it will center.
  5. Do this to the other columns that you need to merge.
Mohammad Sadiqur Rahman
  • 5,379
  • 7
  • 31
  • 45
Fjodr
  • 919
  • 13
  • 32
  • 2
    I am using Visual Studio 2015 and do not see an option in the Right-Click menu to "Merge Cells." – Del Lee Sep 08 '17 at 14:11
  • Ok, what I'm seeing is that the option to Merge Cells is not on the left most column. I have minimized that column and put nothing in it, and merged cells in all the other columns to acheive my desired result. – Del Lee Sep 08 '17 at 14:40
3

To achive this veritcle merging need two Tablix .

In fact we use multiple Tablix to drag and drop what we need.

For acheive this you need adjust size of the cells to get perfect shape.

Look two simple steps how we did this.

Note: Main Tablix dataset is supplied to inside Tablix

See example image:This this image after[![This is the image before]2

Rajaram1991
  • 95
  • 1
  • 10
1

Below is how to achieve what you want.

I assume that the data table which contains data to be printed in above layout has 7 columns viz image, value1, value2, value3 and text1, text2, text3. That means, each row of data table has 7 fields.

Now, the Tablix is to be designed in such a way that it produces the desired layout which you can do as under:

  1. Add a tablix control to rdlc. By default it shows one header row, one detail row, one footer row and three columns. Remove one column, header row and footer row; resulting in one detail row with two columns.
  2. Add two detail rows so that there are total of three detail rows and two columns; thus, six cells
  3. For ease, I refer to each as cell as A1, B1, A2, B2, A3, B3 (excel like notation)
  4. Set height of each row as required
  5. Set width of each column as required
  6. Specify data table for the tablix
  7. Add image control to cell A1
  8. Add Rectangle control (Rectagle1) to cell A2 and resize it to fill the entire A2 area
  9. Add Textbox control (Textbox1) inside Rectagle1; set size and location of Textbox1
  10. Add another Textbox control (Textbox2) inside Rectagle1; set size and location of Textbox2
  11. Merge A2 and B2 cells to span across the full tablix width
  12. Add Rectangle control (Rectangle2) to above merged cell
  13. Add Textbox control (Textbox3) inside Rectangle2; set size and location of Textbox3
  14. Add Textbox control (Textbox4) inside Rectangle2; set size and location of Textbox4
  15. Add Textbox control (Textbox5) inside Rectangle2; set size and location of Textbox5

Now, the required layout is ready; rest of the things you can complete in my opinion.

Rupesh
  • 242
  • 2
  • 6
1

since I had this problem with vertical merge not being available, I wanted to let you know how I solved it. Instead of merging vertically, I expanded the height, then created a table inside the cell, or horizontally merged cells. This gave me the same exact result as if I had merged vertically. Hope this helps you/someone.