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
Example:
max.y = 140
data=""
for y = 1 to max.y
data<1,y> = "Row ":y
next
call set_property(ctrl,"Invalue",data)
for y = 1 to max.y step 2
call set_property(ctrl,"Cellmerge[1;":y:"]", 1:@fm:2)
next
What can be the problem?
Regards Ed Keeman
Our SrpControls.ocx is at 3.2.0 RC3
Example:
max.y = 140
data=""
for y = 1 to max.y
data<1,y> = "Row ":y
next
call set_property(ctrl,"Invalue",data)
for y = 1 to max.y step 2
call set_property(ctrl,"Cellmerge[1;":y:"]", 1:@fm:2)
next
What can be the problem?
Regards Ed Keeman
Comments
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.
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.
Ed
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.
I used the wrong counter for merging.
Everything works fine now.
Thanks!