Do not apply condition to table rows in a section of a table that has spanning. When you span rows, the number of rows is calculated. When you apply conditions and do not include that condition in your output, the number of rows for spanning is taken incorrectly. In the output, the table is displayed correctly.