htmlcsshtml-tablevisualforcepage-break

Visualforce page: Table does not add a page break on rowspanned cells


I'm having the same issue related this question: table rowspan page break

In my Visualforce page, my html table has a column with a custom rowspan (depending on the amount of rowspanned rows) and I'm having a style issue (please see the issue in the green square): enter image description here

enter image description here

I'm using a tr with style as page-break-before: auto and a dynamic rowspan (depending on business logic)

I tried with the apge-break-inside in the rowspanned tr, but without result.


Solution

  • I solved my issue by adding inner tables in the rows inside the main table instead of using rowspan property in the 'tr' and not using page breaks:

     <table class="general">
        <thead style="display: table-header-group; valign: top">
        .
        .
        .
        </thead>
        <tbody>
            <apex:repeat value="{!VALUE}" var="VAR">
            <tr>
                <td>
                    <apex:outputText escape="false" value="{!VALUE}" />
                </td>
                <td>
                <table>
                <apex:repeat value="{!VALUE}" var="VAR">
                <tr>
                        <td>
                            <apex:outputText escape="false" value="{!value}" />
                        </td>
                 </tr>
                 </apex:repeat>
                 </table>
            </tr>
        </tbody>