I have created a script report, now when i click on ‘show report’ it show report with all the columns and records, then i added it on dashboard as a shortcut link of this report, now when i click on this link, it navigates me to diff page but the page is blank white screen with header, and i see one error on console:
VM3304:1 Uncaught (in promise) SyntaxError: “undefined” is not valid JSON
at JSON.parse ()
at report_view.js:31:33
report_view.js (snippet)
if (this.report_name) {
return this.get_report_doc().then((doc) => {
this.report_doc = doc;
this.report_doc.json = JSON.parse(this.report_doc.json);
this.filters = [
...(Array.isArray(this.report_doc.json.filters)
? this.report_doc.json.filters
: []),
...this.parse_filters_from_route_options(),
];
this.order_by = this.report_doc.json.order_by;
this.add_totals_row = this.report_doc.json.add_totals_row;
this.page_title = __(this.report_name);
this.page_length = this.report_doc.json.page_length || 20;
this.order_by = this.report_doc.json.order_by || "modified desc";
this.chart_args = this.report_doc.json.chart_args;
});
} else {
this.add_totals_row = this.view_user_settings.add_totals_row || 0;
this.chart_args = this.view_user_settings.chart_args;
}
return this.get_list_view_settings();
}
why it shows blank screen ?