Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Outputting as an atachment to a Email

edited May 2004 in General
How can I make my Reports output as an attachment to a Email that any user
can read.

Thanks,

Tony

Comments

  • edited May 2004
    Easiest way I found is to export it as a PDF and send it as an attachment
    that way. I dont think PDF export comes out of the box, so you may need to
    look at www.waler.com
  • edited May 2004
    Hi Tony,

    If you are looking for a comprehensive solution for outputting your reports in
    popular formats where any authorized user can read it, you ought to take a look
    at eDocEngine VCL. You can find the full feature trials here:
    www.gnostice.com

    eDocEngine also has built-in capability to email exported reports as an
    attachment. Here's an example of the email event you need to program, from the
    FAQ:

    procedure TForm1.gtPDFEngine1EMail(Sender: TgtCustomDocumentEngine; EMailInfo:
    TgtEMailInfo; var Continue, CancelEmail: Boolean);
    begin
    EMailInfo.Host := 'mail.smtp.yourdomain.com'; { your mail server name }
    EMailInfo.UserID := 'userid'; { your account id }
    EMailInfo.Password := 'password';
    EMailInfo.Body.Add('');
    EMailInfo.FromAddress := 'userid@yourdomain.com';
    EMailInfo.Subject := '';
    { Multiple recipients can be provided in a single string
    separated by a semi-colon (;) or by calling the Add method
    again for each recipient }

    EMailInfo.RecipientList.Add('someone@thierdomain.com');
    // EMailInfo.CCList.Add('');
    // EMailInfo.BCCList.Add('');
    end;

    Please feel free to contact us for any assistance you need.

    --
    Girish Patil
    Gnostice Information Technologies www.gnostice.com
    ---------------------------------------------------------------------
    Gnostice eDocEngine (http://www.gnostice.com/edoc_engine.asp) -
    Electronic document creation, PDF eForms and report export components

    Gnostice PDFtoolkit (http://www.gnostice.com/pdftoolkit.asp) -
    PDF document management and PDF eForms processing components
    ---------------------------------------------------------------------

  • edited May 2004
    As Craig indicated, you'll first want to export it to something that can be
    read by all (JPG, BMP, HTML, etc.) and then attach it to the email.
    Otherwise you'd have to distribute a Report Builder reader.

    I've used both Whaler's and Gnostice's products and both will do the job.
    Be aware of how they both save multi-page reports (i.e. one report may
    generate several JPGs, one per page) so that you can then easily attach them
    later. If you'd like some sample code, email me directly.

    -k-

  • edited May 2004
    Thanks very much for all that. This is a really good NG.
This discussion has been closed.