diff --git a/frappe/core/doctype/report/report.py b/frappe/core/doctype/report/report.py index 6b40cd7d33..1b6957d057 100644 --- a/frappe/core/doctype/report/report.py +++ b/frappe/core/doctype/report/report.py @@ -100,7 +100,7 @@ class Report(Document): columns = [] out = [] - if self.report_type in ('Query Report', 'Script Report'): + if self.report_type in ('Query Report', 'Script Report', 'Custom Report'): # query and script reports data = frappe.desk.query_report.run(self.name, filters=filters, user=user) for d in data.get('columns'): diff --git a/frappe/email/doctype/auto_email_report/auto_email_report.js b/frappe/email/doctype/auto_email_report/auto_email_report.js index c4f5397ca0..f8bdcb21a2 100644 --- a/frappe/email/doctype/auto_email_report/auto_email_report.js +++ b/frappe/email/doctype/auto_email_report/auto_email_report.js @@ -54,9 +54,9 @@ frappe.ui.form.on('Auto Email Report', { show_filters: function(frm) { var wrapper = $(frm.get_field('filters_display').wrapper); wrapper.empty(); - if(frm.doc.report_type !== 'Report Builder' + if(frm.doc.report_type === 'Custom Report' || (frm.doc.report_type !== 'Report Builder' && frappe.query_reports[frm.doc.report] - && frappe.query_reports[frm.doc.report].filters) { + && frappe.query_reports[frm.doc.report].filters)) { // make a table to show filters var table = $('