This commit is contained in:
@@ -14,7 +14,7 @@ todo: Need client to accept an open object url which directly opens a report
|
|||||||
So they would click on a link in an email and be taken to login and then directly to previewing the report
|
So they would click on a link in an email and be taken to login and then directly to previewing the report
|
||||||
|
|
||||||
URL: 404 - Object not found: "/viewreport/2/100/1" /viewreport/objecttype/:objectid/:reportid
|
URL: 404 - Object not found: "/viewreport/2/100/1" /viewreport/objecttype/:objectid/:reportid
|
||||||
http://localhost:8080//viewreport/2/100/1
|
http://localhost:8080/viewreport/1/1
|
||||||
|
|
||||||
todo: export from grid to xls, csv etc.
|
todo: export from grid to xls, csv etc.
|
||||||
I'm thinking perhaps also a secondary ability to make report templates that are actually intended for export to xls or whatever as an additional feature
|
I'm thinking perhaps also a secondary ability to make report templates that are actually intended for export to xls or whatever as an additional feature
|
||||||
|
|||||||
@@ -610,7 +610,7 @@ export default {
|
|||||||
async uploadLogo(fileData, size) {
|
async uploadLogo(fileData, size) {
|
||||||
let that = this;
|
let that = this;
|
||||||
try {
|
try {
|
||||||
var data = new FormData();
|
let data = new FormData();
|
||||||
data.append(fileData.name, fileData);
|
data.append(fileData.name, fileData);
|
||||||
|
|
||||||
//-----------------
|
//-----------------
|
||||||
@@ -649,6 +649,27 @@ export default {
|
|||||||
.getBrowserFirstLanguage()
|
.getBrowserFirstLanguage()
|
||||||
.split("-", 1)[0]
|
.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";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//---------------
|
//---------------
|
||||||
|
|
||||||
|
|||||||
@@ -90,10 +90,11 @@ export default {
|
|||||||
/*
|
/*
|
||||||
public class RenderReportParameter
|
public class RenderReportParameter
|
||||||
{
|
{
|
||||||
public long ReportId { get; set; }
|
public long ReportId { get; set; }
|
||||||
public long[] SelectedRowIds { get; set; }
|
public long[] SelectedRowIds { get; set; }
|
||||||
public string DataListKey { get; set; }
|
public string DataListKey { get; set; }
|
||||||
public string ListView { get; set; }//optional, if null or empty will use default list view built into DataList
|
public string ListView { get; set; }//optional, if null or empty will use default list view built into DataList
|
||||||
|
public JToken ClientMeta {get;set;}//meta JSON data passed from client, not part of biz object data
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
let reportDataOptions = vm.reportDataOptions;
|
let reportDataOptions = vm.reportDataOptions;
|
||||||
|
|||||||
@@ -335,7 +335,9 @@ export default {
|
|||||||
//check if it's an open report link and if so
|
//check if it's an open report link and if so
|
||||||
//trigger that to open in a new window and continue on to normal home page
|
//trigger that to open in a new window and continue on to normal home page
|
||||||
if (toPath.startsWith("/viewreport")) {
|
if (toPath.startsWith("/viewreport")) {
|
||||||
alert("stub: open report");
|
(async function() {
|
||||||
|
await window.$gz.api.renderReport(1, 1); //objectid,reportid
|
||||||
|
})();
|
||||||
vm.$router.push(vm.$store.state.homePage);
|
vm.$router.push(vm.$store.state.homePage);
|
||||||
} else {
|
} else {
|
||||||
//otherwise open the url indicated
|
//otherwise open the url indicated
|
||||||
|
|||||||
Reference in New Issue
Block a user