Code: Select all
StiReport report = stiPreviewControl1.Report;
string tempFile = "D:\\MyTempFile";
if (sender is StiExcelExportService)
{
tempFile += ".xls";
}
(sender as StiExportService).Export(report, tempFile, false);
MAPI.SendEMail(((report.ReportAlias != null) && (report.ReportAlias.Trim().Length > 0)) ? report.ReportAlias : report.ReportName, report.ReportDescription, tempFile);
Thank you.