ActiveReports 14 .NET Edition
ActiveReports 14 User Guide / How To / Page Report/RDL Report How To / Report Controls / Merge Cells in a Data Region
In This Topic
    Merge Cells in a Data Region
    In This Topic

    Merging data in Table or Tablix data regions is a common scenario. ActiveReports 14 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 14, 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 Quick Start, Connect to a Data Source and Add a Dataset for more information.

    Note: This topic uses the Orders table in the NWind database. The NWIND.mdb file can be downloaded from GitHub: ..\Samples14\Data\NWIND.mdb.

     Merging cells in a data region

    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.