This commit is contained in:
2020-10-09 14:35:14 +00:00
parent cbf0ee6516
commit b6ec4078c5
4 changed files with 30 additions and 40 deletions

View File

@@ -656,7 +656,7 @@ export default {
// RENDER REPORT DIRECTLY
//
//
async renderReport(objectid, reportid) {
async renderReport(objectid, reportid, redirectNotPopup) {
let reportDataOptions = {
ReportId: reportid,
SelectedRowIds: [objectid],
@@ -668,10 +668,15 @@ export default {
throw new Error(res.error);
} else {
let reportUrl = window.$gz.api.reportDownloadUrl(res.data);
if (window.open(reportUrl, "Report") == null) {
throw new Error(
"Problem displaying report in new window. Browser must allow pop-ups to view reports; check your browser setting"
);
if (redirectNotPopup) {
//used for direct report open from direct report view url
window.location.replace(reportUrl);
} else {
if (window.open(reportUrl, "Report") == null) {
throw new Error(
"Problem displaying report in new window. Browser must allow pop-ups to view reports; check your browser setting"
);
}
}
}
}