This commit is contained in:
2020-09-14 17:38:30 +00:00
parent d574fef3fa
commit 8aabc0f4fe
4 changed files with 28 additions and 4 deletions

View File

@@ -610,7 +610,7 @@ export default {
async uploadLogo(fileData, size) {
let that = this;
try {
var data = new FormData();
let data = new FormData();
data.append(fileData.name, fileData);
//-----------------
@@ -649,6 +649,27 @@ export default {
.getBrowserFirstLanguage()
.split("-", 1)[0]
};
},
///////////////////////////////////
// RENDER REPORT DIRECTLY
//
//
async renderReport(objectid, reportid) {
let reportDataOptions = {
ReportId: reportid,
SelectedRowIds: [objectid],
ClientMeta: this.reportClientMetaData()
};
let res = await window.$gz.api.upsert("report/render", reportDataOptions);
if (res.error) {
throw res.error;
} else {
let reportUrl = window.$gz.api.reportDownloadUrl(res.data);
if (window.open(reportUrl, "Report") == null) {
throw "Problem displaying report in new window. Browser must allow pop-ups to view reports; check your browser setting";
}
}
}
//---------------