Send reports per email with my own email-client

Stimulsoft Reports.NET discussion
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Send reports per email with my own email-client

Post 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.
scotty
Posts: 28
Joined: Tue Jul 04, 2006 2:05 am
Location: Austria

Send reports per email with my own email-client

Post by scotty »

Hi

Now it works perfect!

thank you - great support
scotty
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Send reports per email with my own email-client

Post by Edward »

Let us know if you need any help.

Thank you.
Post Reply