Send reports per email with my own email-client
Posted: Tue May 01, 2007 7:03 am
Please use the following code:
In that case the standard export dialog will appear during the export in to predefined tempFile.
Thank you.
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.