Send reports per email with my own email-client

Stimulsoft Reports.NET discussion
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 »

i'm working on an email-client software with support of reports.
when the user send a rendered report by clicking on the sendperemail-button in the toolbar of the previewcontrol, the report should be send with my own email-client.

When i subcribe the CllickSendEMailButton event (this works), the stiPreviewControl don't show the submenus of the emailbutton

Is there an event where i can send the exported report after clicking the sendperemail-button?

thanks
scotty
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Send reports per email with my own email-client

Post by Vital »

We have added event ProcessSendEMail to StiPreviewControl. It will be available in build from 14 April.

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 »

Thank your for your prompt reply and great support!!

Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Send reports per email with my own email-client

Post by Edward »

Thank you for the good words.
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

how can i find out which submenu the user clicked on in the ProcessSendEmail-event?

thanks

Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Send reports per email with my own email-client

Post by Vital »

Please use following code:

Code: Select all

StiExportService service = sender as StiExportService;
if (service.ExportFormat == StiExportFormat.Pdf)....
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

how can i show the "Export Parameter"-dialog in the ProcessSendEmail-event?

thank you
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

(sender as StiExportService).Export(stiPreviewControl1.Report, null, true);
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

this is not working for me! I want to export the report by showing the "Export Parameter"-Dialog to a tempfile and send the tempfile as attachment by by own email functionality (all this should by handled in the ProcessSendEmail-event)

When i call service.Export(report, fileName, true), the service calls the standard emailclient - so is it possible to show the "Export Parameter"-Dialog differently?

thank you
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.
Post Reply