Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Cellmerge fails in tables with more rows

If we want to merge rows in a table with more than about 135 rows then merging fails,
Our SrpControls.ocx is at 3.2.0 RC3


max.y = 140

for y = 1 to max.y
data<1,y> = "Row ":y
call set_property(ctrl,"Invalue",data)

for y = 1 to max.y step 2
call set_property(ctrl,"Cellmerge[1;":y:"]", 1:@fm:2)

What can be the problem?
Regards Ed Keeman


  • edited December 2018
    Is the goal here to make every two rows behave as one logical record? If so, the table is designed to automate that scenario. The rule of thumb is this: if you are putting logical records into the table, you should always set the RowsToRecords property. This property should be the first property you set as it will determine the behavior of the table.

    In your case, you would set RowsToRecords to 2, which tells the table to treat every two rows as one logical record. Then, before adding data, you would set the style of the first two rows. This is where you would set CellMerge, CellType, CellAlignment, etc. Thirdly, you set the TitleList property, which sets all the header labels in one call. Lastly, you add the data via the LIST or ARRAY property to populate the table. The table will take care of repeating your styling from record to record.

    I'll look into this issue, but if you are looking for consistency, then RowsToRecords is your best friend. We use it for 99% of our tables.
  • Hey Kevin,
    Each row is a record, but in sets they share a couple of fields.
    We have tried however the RowsToRecords property and see that merging also fails for some rows.

  • edited December 2018
    You were right. There was an overflow error that we never caught (since we always use RowsToRecords). It is fixed in 4.1.2 RC12.
  • Sorry Kevin, but the bug is still there in 4.1.2 RC12.
  • I will need more information. The following code:

    Set_Property(Ctrl, "OLE.Dimension", 5) NumRows = 140 Data = "" For i = 1 to NumRows Data<1, i> = "Row ":i Next i Set_Property(Ctrl, "OLE.ARRAY", Data) For i = 1 to NumRows step 2 Set_Property(Ctrl, "OLE.CellMerge[1;":i:"]", 1:@FM:2) Next i

    produces the following results:

    I get no missing merges.
  • Sorry Kevin my bad.
    I used the wrong counter for merging.
    Everything works fine now.

Sign In or Register to comment.