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:
*<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body>
<table style="border: 2px solid black;">
<thead>
<tr>
<th style="min-width: 350px;">
Item
</th>
<th style="min-width: 150px;">
Price
</th>
</tr>
</thead>
<tbody>
{{#each items}}
<tr class="item">
<td>
{{name}}
</td>
<td style="text-align: center;">
{{price}} zł {{{pdfAddPageItem price}}}
</td>
</tr>
{{/each}}
</tbody>
<tfoot>
<tr>
<td>
Suma:
</td>
<td
style="text-align: center;">
{{pageNumber}} zł
</td>
</tr>
</tfoot>
</table>
</body>
</html>*
Thanks in advance for every advice!