ActiveReports 13
Merge Cells in a Data Region
ActiveReports 13 > ActiveReports User Guide > How To > Page Report/RDL Report How To > Work with Report Controls and Data Regions > Merge Cells in a Data Region

Merging data in Table or Tablix data regions is a common scenario. ActiveReports 13 provides AutoMergeMode property that consists of Always, Never, and Restricted values. The detail cells with same data values and with AutoMergeMode property set to:

The reports using AutoMerge in older versions can be opened correctly in ActiveReports 13, and new reports with AutoMergeMode are correctly opened in previous ActiveReports versions. 

The following steps take you through how to add automatic merge to the cells in Table and Tablix data regions.

These steps assume that you have already added a Page Report/RDL Report template to your project, connected it to a data source and added a dataset. See Adding an ActiveReport to a Project, Connect to a Data Source and Add a Dataset for more information.

Note: This topic uses the Orders table in the NWind database. By default, in ActiveReports, the NWind.mdb file is located in the [User Documents folder]\GrapeCity Samples\ActiveReports 13\Data folder.

 

To apply merge in Table cells

  1. From the toolbox, drag a Table data region onto the report design surface.
  2. Select the Table and set the BorderStyle property to Solid.
  3. In the Table, select the following TextBoxes and from the Fields Selection Adorner, set their Values as follows.
    TextBox Value
    TextBox4 OrderID
    TextBox5 ShipName
    TextBox6 EmployeeID
  4. Select TextBox6 and set AutoMergeMode property to Restricted. This merges employee ids depending on whether the corresponding ship names (cells in previous column) are merged.
  5. Select TextBox5 and set AutoMergeMode property to Always. This merges the cells with similar ship names.
  6. Set the BorderStyle property of Header row and Detail row to Solid to view the merged cells clearly.

To merge cells in Tablix (outside row group)

  1. From the toolbox, drag a Tablix data region onto the report design surface.
  2. Select the Tablix and set the BorderStyle property to Solid.
  3. Right-click Textbox4, select Insert Column, and then select Outside Group - Right.
  4. In the Tablix, select the following TextBoxes and set their Values as follows.
    TextBox Value
    TextBox3 OrderID
    TextBox4 ShipName
    TextBox6 EmployeeID
  5. Select TextBox6 and set AutoMergeMode property to Restricted. This merges employee ids depending on whether the corresponding ship names (cells in previous column) are merged.
  6. Select TextBox4 and set AutoMergeMode property to Always. This merges the cells with similar ship names.
  7. Select the Row Group area and set the BorderStyle property to Solid to view the merged cells clearly.