<tfoot> on last page only not every page



  • Sorry about the learning curve

    Now just trying to get <tfoot> to only show on the last page, not every page.

    <table class="table striped table-border compact">
                <thead>
                    <tr >
                        <th>Account Id</th>
                        <th>Account Name</th>
                        <th align="right" >Bonus Balance</th>
                        <th align="right" >Cash Balance</th>
                        <th align="right" >Account Balance</th>
                    </tr>
                </thead>
                <tbody>
                    {{#each Account}}
                    <tr>
                         <td>
                            {{PunterId}}
                        </td>
                         <td>
                            {{AccountName}}
                        </td>
                        <td align="right">
                            $ {{numberFormat2 CurrentMinimumBalance}}
                        </td>
                        <td align="right">
                            $ {{numberFormat2 CashBalance}}
                        </td>
                        <td align="right">
                            $ {{numberFormat2 LastCalculatedBalance}}
                        </td>
                        </tr>
                    {{/each}}
                </tbody>
           
                <tfoot>
                    <tr>
                        <td>Totals:</td>
                        <td>_</td>
                        <td align="right">
                            Bonus: ${{total1 Account}}
                        </td>
                        <td align="right">
                            Cash: ${{total2 Account}}
                        </td>
                        <td align="right">
                            Balance: ${{total3 Account}}
                        </td>
                    </tr>
    
                </tfoot>
            </table>
    


  • The only way I got to get this to work was to create another table. while it works and only shows up on the last page. Works but does not seem like the right solution vs using <tfoot>

     <table  class="table striped table-border compact">
                <thead>
                    <tr >
                        <th>-</th>
                        
                        <th style="text-align:right;">Totals:</th>
                        <th style="text-align:right;">
                            Bonus: ${{total1 Account}}
                        </td>
                        <td style="text-align:right;">
                            Cash: ${{total2 Account}}
                        </td>
                        <td style="text-align:right;">
                            Balance: ${{total3 Account}}
                        </td>
                    </tr>
            </table>
    

Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.