Hello,
We have a recent project converted from ANM2020 to ANM2021.
In a Summary Report, we have in CustomTemplateBody data displayed on two rows.
On the second row, we put as an attribute of the <tr>
the dbvalue of a field.
We need this as an attribute in order to highlight (all days which are displayed as columns) employees who worked below their schedule.
Example:
<tr data-rowindex="{{{row_cnt}}}" class="ew-table-row">
<td> ...</td>
...
</tr>
<tr data-rowindex="{{{row_cnt}}}" class="ew-table-alt-row" data-dh="{{: {{{dbvalue DailyHours}}} }}">
<td> ...</td>
...
</tr>
The page load with a cshtml render error: The name 'k' does not exist in the current context
The cshtml page is rendered with the second row as follows (the k doesn't exists as a variable):
<tr data-rowindex="@(j)" class="ew-table-alt-row" data-dh="{{: ~root.rows[@(k - 1)].DailyHours }}">
Ideas how to fix this?