I've placed a custom button on viewer,in this case how to invoke viewer.onEmailReport from my custom the button?
thanks
call viewer.onEmailReport from a custom function
Re: call viewer.onEmailReport from a custom function
seems I found a solution to send pdf report to my app controller from js viewer
Code: Select all
const settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
const service = new Stimulsoft.Report.Export.StiPdfExportService();
const stream = new Stimulsoft.System.IO.MemoryStream();
service.exportTo(report, stream, settings);
await fetch("/api/sendmail", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: {
"data": Stimulsoft.System.Convert.toBase64String(stream.toArray()),
"email": "my@mail.com",
"subject": "subject",
"message": "message"
}
});-
Lech Kulikowski
- Posts: 7685
- Joined: Tue Mar 20, 2018 5:34 am
Re: call viewer.onEmailReport from a custom function
Hello,
Thank you for sharing your experience with other users.
Thank you for sharing your experience with other users.