ActiveReports Developer 7
Cell Merging In Matrix
See Also Support Forum
ActiveReports Developer 7 > ActiveReports Developer Guide > How To > Page Report How To > Cell Merging In Matrix

Glossary Item Box

In the Matrix data region, cells with same values are merged automatically to delete duplicate values. The following image illustrates the result of merged cells in a Matrix where similar data exists.


To allow cell merging in Matrix

The following steps use the EmployeeInfo table from the Reels database. By default, in ActiveReports Developer, the Reels.mdb file is located at [User Documents folder]\ComponentOne Samples\ActiveReports Developer 7\Data\Reels.mdb.

  1. From the Visual Studio toolbox, add the Matrix data region onto the report design surface.
  2. In the bottom left cell, set a field like StoreName (Fields!StoreName.Value). This automatically creates a row grouping on StoreName.
  3. Right-click the Matrix to select Properties, and in the Properties Window that appears, at the bottom select Property dialog.
  4. In the Matrix dialog that appears, go the Row Groups page and click the Add (+) button at the top of the group list to add another group.
  5. In the expression field of this group, set an expression like Fields!City.Value. This creates an additional row grouping on City.
  6. Repeat step 4 and 5 above to add two more row groups on Name (Fields!Name.Value) and EmployeeID (Fields!.EmployeeID.Value).
    Note: Make sure that the Value property of each TextBox representing the row group in the Matrix is set to the corresponding field value.
  7. Click OK to close the dialog.
  8. From the Visual Studio toolbox, place a Container control inside the merged cell of the first row in the Matrix data region to create headers for respective columns.
    Note: Use textbox controls inside the Container control to create a label for each column.
  9. Go to the preview tab to view the result.

 Cell with merged data automatically expands to accommodate large strings.

 

In case the data flows to the next page at a point where the merged cell is located, the merged cell value repeats on the new page along with the corresponding values of the matrix.

Page 1 Page 2

See Also

Concepts
Matrix

©2014. ComponentOne, a division of GrapeCity. All rights reserved.