Table subtotals on every page

  • Hello Everyone,
    I need to find best tool for report generating for my project. Main issue during searching is always with subtotals for table on every page.
    Here using chrome-pdf and handlebars I can see I probably need to use double rendering mechanism. I know how to add data to every page like table row value but I don't have any idea how to calculate subtotal for particular page and fill that during second render.
    I am trying smth like this:

            <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
            <table style="border: 2px solid black;">
                        <th style="min-width: 350px;">
                        <th style="min-width: 150px;">
                    {{#each items}}
                    <tr class="item">
                        <td style="text-align: center;">
                            {{price}} zł {{{pdfAddPageItem price}}}
                                style="text-align: center;">
                                {{pageNumber}} zł

    Thanks in advance for every advice!

  • I've tried the idea with the second render.
    In the first render, I add an empty tfoot which will just hold the space.
    In the second render I won't add tfoot, but instead, add an extra plain row with a calculated sum value.

    Here is the demo

Log in to reply

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