Hi Elton,
Thanks so much for clearing this up. I don’t recall you mentioning before that extra comments could cause an issue. Sorry. It seems like commented-out html should be ignored.
I’m confused by your comment about my code creating a new table with each record loop. It looks like your code also does that, because the Table element is enclosed within the {{#_Each… block. Can you briefly explain this?
There are 2 remaining issues with the report:
1:
With the footer present in the template, I get an extra blank page after each expected page, except for the last page. I’ve tried playing with the table height but that doesn’t help. Should the page margins be adjusted, or is there something else causing this?
It’s unclear whether the footer is inside the bottom margin area like Access does, or whether the bottom margin is below the footer area.
UPDATE: I removed the page break here:
<div class="fiveGroupByHeader">
<div style="border: 1px dashed black; display: flex; justify-content: center; width: 100%;" contenteditable="false" class="fiveReportBreakAfter"><--- Page Break ---></div>
I removed the div above, but kept the one with the class “fiveGroupByHeader”
this seems to work, now I have the 3 pages that I expected.
But I’m concerned that this is not robust enough. What do you think?
2: (ignore this item… I have solved it)
The footer as you left it in the template does not display any of the values expected. I think this may be because the footer is after the {{/_Each}} flag. Is it possible the values are no longer in scope? *
I tried moving the header up before the {{/_Each}} flag:
<!-- Page footer -->
<table class="fiveReportFooter-everyPage" style="font-size: 10px; width: 100%; border-collapse: collapse; margin: 0; padding: 0;">
<tbody>
<tr>
<td style="width: 8%; color: black; text-align: right; padding: 0 6px 0 0;"><strong>Total Members:</strong></td>
<td style="width: 8%; color: black; text-align: left;"><strong>{{rqMemberList.[TotalMembers]}}</strong></td>
<td style="width: 8%; color: black; text-align: right; padding: 0 6px 0 0;"><strong>Total Current:</strong></td>
<td style="width: 8%; color: black; text-align: left;"><strong>{{rqMemberList.[TotalCurrent]}}</strong></td>
<td style="width: 8%; color: green; text-align: right; padding: 0 6px 0 0;"><strong>Lifetime:</strong></td>
<td style="width: 8%; color: green; text-align: left"><strong>{{rqMemberList.[TotalLifetime]}}</strong></td>
<td style="width: 8%; color: #c00000; text-align: right; padding: 0 6px 0 0;"><strong>Past Due:</strong></td>
<td style="width: 8%; color: #c00000; text-align: left;"><strong>{{rqMemberList.[TotalPastDue]}}</strong></td>
<td style="width: 36%"><br></td>
</tr>
</tbody>
</table>
<div class="fiveReportHelper">{{/_Each}}</div>
This solves the problem, and the values display correctly. I’m not sure this won’t break something else, though.
Important: The report query returns the totals needed on every row, as this seemed easier than trying to calculate them in the report. If the data set is out of scope after the last {{/_Each}}, would that explain the issue?
If there is a better way to get to any of the row values after the {{/_Each}} command, please advise.
UPDATE: Never mind #2, I was able to figure this out myself. I needed to add the full path:
{{@root.[rqMemberList].[Records].[0].[FieldName]}}
to the td element value because this table is outside the record loop
Thanks again so much!!!