diff --git a/frappe/public/js/frappe/views/reports/query_report.js b/frappe/public/js/frappe/views/reports/query_report.js index aa284f6aa1..596a6501ad 100644 --- a/frappe/public/js/frappe/views/reports/query_report.js +++ b/frappe/public/js/frappe/views/reports/query_report.js @@ -902,7 +902,13 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList { get_data_for_print() { const indices = this.datatable.datamanager.getFilteredRowIndices(); - return indices.map(i => this.data[i]); + let rows = indices.map(i => this.data[i]); + let totalRow = this.datatable.bodyRenderer.getTotalRow().reduce((row, cell) => { + row[cell.column.id] = cell.content; + return row; + }, {}); + rows.push(totalRow); + return rows; } get_columns_for_print() {