Help not downloading mrt file while using onSaveReport event
Posted: Tue Nov 28, 2023 9:20 pm
Greetings.
Im using the following code to save the reports using a service(await this.mObjViewer.guardarReportes(urlGuardaReportes)) using the onSaveReport event, but this also triggers a download of the mrt file to the client browser. Is any way to dissable the dowload and only keep my server save process? Really appreciate your help.
this.designer.report = new Stimulsoft.Report.StiReport();
this.designer.onSaveReport = async (e) => {
try {
this.mostrarWaitDialog('MENSAJES.WAIT.GUARDANDO_DATOS');
const urlGuardaReportes: ClsReporte[] = [];
const urlGuardaReporte: ClsReporte = new ClsReporte();
report = e.report.saveToJsonString();
urlGuardaReporte.Nombre = this.dataReporte.Nombre;
urlGuardaReporte.Contenido = report;
urlGuardaReportes.push(urlGuardaReporte);
await this.mObjViewer.guardarReportes(urlGuardaReportes);
this.mostrarQuestion(async (resp: boolean) => {
if (resp) {
this.dmReportes.quitarTabComponente(EnumMenuOpReportes.Designer);
}
}, 'MENSAJES.QUESTION.REPORTE_GUARDADO_EXITOSO');
} catch (e) {
this.mostrarMsg(e.message, 'error');
} finally {
this.cerrarWaitDialog();
}
};
Im using the following code to save the reports using a service(await this.mObjViewer.guardarReportes(urlGuardaReportes)) using the onSaveReport event, but this also triggers a download of the mrt file to the client browser. Is any way to dissable the dowload and only keep my server save process? Really appreciate your help.
this.designer.report = new Stimulsoft.Report.StiReport();
this.designer.onSaveReport = async (e) => {
try {
this.mostrarWaitDialog('MENSAJES.WAIT.GUARDANDO_DATOS');
const urlGuardaReportes: ClsReporte[] = [];
const urlGuardaReporte: ClsReporte = new ClsReporte();
report = e.report.saveToJsonString();
urlGuardaReporte.Nombre = this.dataReporte.Nombre;
urlGuardaReporte.Contenido = report;
urlGuardaReportes.push(urlGuardaReporte);
await this.mObjViewer.guardarReportes(urlGuardaReportes);
this.mostrarQuestion(async (resp: boolean) => {
if (resp) {
this.dmReportes.quitarTabComponente(EnumMenuOpReportes.Designer);
}
}, 'MENSAJES.QUESTION.REPORTE_GUARDADO_EXITOSO');
} catch (e) {
this.mostrarMsg(e.message, 'error');
} finally {
this.cerrarWaitDialog();
}
};