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

Emailing and saving a PDF

edited February 2009 in Devices
I need to email a report as a PDF and also save a copy of the PDF.

I have:

PPReport3.DeviceType := 'pdffile';
ppReport3.Print;
reportfilename := ppDBText161.Text +'.pdf';


JvMail1.Body := wwDBRichEdit1.Lines;
JvMail1.Attachment.Clear;
JvMail1.Attachment.Add(reportfilename);
JvMail1.SendMail(true);

I need to suppress the dialogue box, output the pdf into the application
directory then open the mail client with the PDF attached.

I am getting error 'cannot create file'

What am I doing wrong here please?

Comments

  • edited February 2009
    Steve,

    Which version of ReportBuilder are you using? The latest version contains
    built-in PDF and Email support so there is no need to use third party tools
    and there is a feature to specifically send a PDF and save to file
    simultaneously.

    I am unaware of the "reportfilename" property however it seems this should
    be set before the call to Report.Print.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.