Browse Source

fix: pdf report js issues (#8554)

* fix: pdf report js issues

* fix: template being set to null
version-14
Sun Howwrongbum 5 years ago
committed by mergify[bot]
parent
commit
b47b9ef5a8
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      frappe/public/js/frappe/views/reports/query_report.js

+ 5
- 2
frappe/public/js/frappe/views/reports/query_report.js View File

@@ -859,17 +859,20 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
const landscape = print_settings.orientation == 'Landscape';

const custom_format = this.report_settings.html_format || null;
const columns = this.get_columns_for_print(print_settings, custom_format);
const data = this.get_data_for_print();
const applied_filters = this.get_filter_values();

const filters_html = this.get_filters_html_for_print();
const content = frappe.render_template(print_settings.columns ? 'print_grid' : custom_format, {
const template =
print_settings.columns || !custom_format ? 'print_grid' : custom_format;
const content = frappe.render_template(template, {
title: __(this.report_name),
subtitle: filters_html,
filters: applied_filters,
data: data,
original_data: this.data,
columns: this.get_columns_for_print(print_settings, custom_format),
columns: columns,
report: this
});



Loading…
Cancel
Save