diff --git a/frappe/public/js/frappe/views/reports/query_report.js b/frappe/public/js/frappe/views/reports/query_report.js index 82cdb69961..4bf6befd39 100644 --- a/frappe/public/js/frappe/views/reports/query_report.js +++ b/frappe/public/js/frappe/views/reports/query_report.js @@ -188,19 +188,20 @@ frappe.views.QueryReport = Class.extend({ if(this.html_format) { var content = frappe.render(this.html_format, { data: frappe.slickgrid_tools.get_filtered_items(this.dataView), - filters:this.get_values(), - report:this}); + filters: this.get_values(), + report: this + }); frappe.render_grid({ - content:content, - title:__(this.report_name), + content: content, + title: __(this.report_name), print_settings: this.print_settings, }); } else { frappe.render_grid({ - grid:this.grid, + grid: this.grid, report: this, - title:__(this.report_name), + title: __(this.report_name), print_settings: this.print_settings, }); } @@ -233,7 +234,8 @@ frappe.views.QueryReport = Class.extend({ base_url: base_url, print_css: print_css, print_settings: this.print_settings, - landscape: landscape + landscape: landscape, + columns: columns }); } else { // rows filtered by inline_filter of slickgrid @@ -257,7 +259,8 @@ frappe.views.QueryReport = Class.extend({ base_url: base_url, print_css: print_css, print_settings: this.print_settings, - landscape: landscape + landscape: landscape, + columns: columns }); } diff --git a/frappe/public/js/lib/microtemplate.js b/frappe/public/js/lib/microtemplate.js index a84ca70b9c..a7c8422792 100644 --- a/frappe/public/js/lib/microtemplate.js +++ b/frappe/public/js/lib/microtemplate.js @@ -93,6 +93,8 @@ frappe.render_grid = function(opts) { } else if(opts.grid) { opts.data = opts.grid.getData().getItems(); } + } else { + opts.columns = []; } // show landscape view if columns more than 10