From edeee39122d9c7ee0e78284087c67b1f9b37a5d5 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Fri, 26 May 2017 11:06:51 +0530 Subject: [PATCH] [minor] fixed pdf export issue for the reports (#3391) --- frappe/public/js/frappe/views/reports/query_report.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/views/reports/query_report.js b/frappe/public/js/frappe/views/reports/query_report.js index 31b2c5dff1..5277aaef15 100644 --- a/frappe/public/js/frappe/views/reports/query_report.js +++ b/frappe/public/js/frappe/views/reports/query_report.js @@ -215,6 +215,8 @@ frappe.views.QueryReport = Class.extend({ return false; } + var orientation = this.print_settings.orientation; + var landscape = orientation == "Landscape" ? true: false 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}); @@ -225,7 +227,8 @@ frappe.views.QueryReport = Class.extend({ title:__(this.report_name), base_url: base_url, print_css: print_css, - print_settings: this.print_settings + print_settings: this.print_settings, + landscape: landscape }); } else { // rows filtered by inline_filter of slickgrid @@ -249,7 +252,8 @@ frappe.views.QueryReport = Class.extend({ title:__(this.report_name), base_url: base_url, print_css: print_css, - print_settings: this.print_settings + print_settings: this.print_settings, + landscape: landscape }); }