diff --git a/frappe/desk/query_report.py b/frappe/desk/query_report.py index fea5f86844..297f8393c1 100644 --- a/frappe/desk/query_report.py +++ b/frappe/desk/query_report.py @@ -201,7 +201,7 @@ def run( if sbool(are_default_filters) and report.custom_filters: filters = report.custom_filters - if report.prepared_report and not ignore_prepared_report and not custom_columns: + if report.prepared_report and not sbool(ignore_prepared_report) and not custom_columns: if filters: if isinstance(filters, str): filters = json.loads(filters) diff --git a/frappe/public/js/frappe/views/reports/query_report.js b/frappe/public/js/frappe/views/reports/query_report.js index 81a4c0207c..052bef73ef 100644 --- a/frappe/public/js/frappe/views/reports/query_report.js +++ b/frappe/public/js/frappe/views/reports/query_report.js @@ -57,6 +57,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList { // throttle refresh for 300ms this.refresh = frappe.utils.throttle(this.refresh, 300); + this.ignore_prepared_report = false; this.menu_items = []; } @@ -592,6 +593,8 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList { frappe.route_options = null; }); + this.ignore_prepared_report = route_options["ignore_prepared_report"] || false; + return frappe.run_serially(promises); } } @@ -639,6 +642,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList { args: { report_name: this.report_name, filters: filters, + ignore_prepared_report: this.ignore_prepared_report, is_tree: this.report_settings.tree, parent_field: this.report_settings.parent_field, are_default_filters: are_default_filters,