Email Fundamentals

The built-in email feature provides numerous ways to export and send a report via email in a single step.  Below is a description of how this can be done.

Send an email from the Preview Window:

  1. Set the TppReport.EmailSettings.Enabled property to True.
  2. Set up the rest of the email settings inlcuding whether you would like to use the built-in email dialog (ShowEmailDialog) or preview the email in your default client (PreviewInEmailClient).
  3. Click the “email” button on the top toolbar of the Preview window to export and send the report being previewed.

Send an email in code from the Report:

  1. Set the TppReport.EmailSettings properties to your specifications.
  2. Call the Report.SendMail routine to automatically export the report and send the email.

Export and Send multiple reports at once:

  1. Create a TppEmail object
  2. Use the TppEmail.AddReport() routine to add as many reports to the emails as you need.  Note that the first report added will provide the email settings for all reports exported and sent.
  3. Call the TppEmail.Send routine to export and send all the reports added in one email.



Sample Delphi code:

Send an email from the preview window:

Send an email from the report:

Send multiple emails using the TppEmail object: