In my, Custom “Page”, I want to call the Export Report Modal from my Script Report, when I clicked the “Download Report”.
I’m able to make it work by following the same code from
apps/frappe/frappe/public/js/frappe/views/reports/query_report.js@export_report
download_report() {
const args = {
cmd: "frappe.desk.query_report.export_query",
report_name: "Report Name",
custom_columns: [],
file_format_type: "Excel",
filters: this.options.selected_filter_values,
applied_filters: this.options.selected_filter_values,
visible_idx: this.results.map((r, idx) => idx),
csv_delimiter: ",",
csv_quoting: 2
};
open_url_post(frappe.request.url, args);
}

