call viewer.onEmailReport from a custom function
Posted: Fri Jan 23, 2026 12:24 pm
I've placed a custom button on viewer,in this case how to invoke viewer.onEmailReport from my custom the button?
thanks
thanks
Reporting tool and data analytics tools for creating reports and dashboards in ASP.NET, ASP.NET MVC, .NET Core, Blazor, Angular, PHP, Python, WPF, JavaScript, and Java applications.
https://forum.stimulsoft.com/
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"
}
});