How to keep merged rows inside a table loop?
How to keep merged rows inside a table loop?
Carbone can't keep a merged rows when it is mixed with a loop of rows, the column will be transformed as a row on the generated report. This article is about creating a document that contains a table with merged columns mixed with loop of rows, such as:
Solution
Create a table inside a table, such as:
When this table wrapping is created, it may also add some space between table (margin/padding). Follow the below instruction to remove it.
Removing extra space for MS Word
It is possible to remove the margin space between the inner table and the cell, follow these instructions for MS Word:
Right-click on the table > "properties"
Select the tab "Table"
Click on the "Options..." button
Set the left and right margin at zero
Save
Removing extra space for Libre Office
Instructions for Libre Office:
Right click on the table > "table properties"
Select the tab "Borders"
Set the padding at zero
Save
Finally generate the report with Carbone and merged rows will render as expected, voilà 🎉
Updated on: 09/09/2022
Thank you!