Page 2 of 2

Send reports per email with my own email-client

Posted: Tue May 01, 2007 7:03 am
by Edward
Please use the following code:

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);
In that case the standard export dialog will appear during the export in to predefined tempFile.

Thank you.

Send reports per email with my own email-client

Posted: Wed May 02, 2007 2:11 am
by scotty
Hi

Now it works perfect!

thank you - great support
scotty

Send reports per email with my own email-client

Posted: Wed May 02, 2007 2:12 am
by Edward
Let us know if you need any help.

Thank you.