<% formWidth = @page.forms.grid.pdfFormWidth( @self() ) %> [ { colSpan: <%- formWidth %>, border: [ false, false, false, false ], stack: [ { table: { body: [ [ { text: [ {$report_cross_type}, { text: {$report_cross_field}, style: 'data-field'}], style: 'data-label', }, { colSpan: {$group_x_count}, text: {$group_x_label}, style: 'field-label', }, {BEGIN cross_totals} { text: ' ', }, {END cross_totals} {BEGIN fake_header_cells} {}, {END fake_header_cells} ], [ { text: {$group_y_label}, style: 'field-label', }, {BEGIN group_header} { text: {$gr_value}, style: 'x-label', }, {END group_header} {BEGIN cross_totals} { text: {$totals}, style: 'x-summary-label', }, {END cross_totals} ], {BEGIN grid_row} [ { text: {$group_y}, style: 'y-label', }, {BEGIN row_record} { text: {$row_value}, style: 'data', }, {END row_record} {BEGIN cross_totals} { text: {$row_summary}, style: 'summary', }, {END cross_totals} ], {END grid_row} {BEGIN cross_totals} [ { text: {$totals}, style: 'y-summary-label', }, {BEGIN col_summary} { text: {$col_summary}, style: 'summary', }, {END col_summary} { text: {$total_summary}, style: 'summary', }, ], {END cross_totals} ] } } ] } ],