Export to PDF and then export to Mail
mierlp
Netherlands
Hi,
I'm trying to do a export to pdf and then to mail for sending
the created pdf to a customer.
Creating a pdf using the frxPDFexport works...and i get a
nice pdf. But how can i send the pdf using frxMAILexport ?
greetz
Peter
I'm trying to do a export to pdf and then to mail for sending
the created pdf to a customer.
Creating a pdf using the frxPDFexport works...and i get a
nice pdf. But how can i send the pdf using frxMAILexport ?
greetz
Peter
Comments
make sure underlying delphi form has both export objects on it.
set any defaults you want for pdf.
use email export and select default format to use.
The mail message will be created and send BUT there's NO attachment.
Our eSafe gives back this message :
Details: .fp3 Msg #740 - The 'Block attachments with invalid file name' rule is active.
Using a default smtp mail tool and attach a .pdf results in
a message which will be deliverd including .pdf
I order to your answer is put both components on the form:
- frxReport_tip is the report including the record data
- frxMAILexport_tip
- frxPDFexport_tip
for sendig i use :
FormMain.frxReport_tip.PrepareReport();
FormMain.frxReport_tip.Export(FormMain.frxMAILexport_tip);
Greetz Peter
frxreport1.LoadFromFile('colatetest.fr3');
frxreport1.PrepareReport;
you may set props of export components here.
if the show dialogs setting of the mail export is true the call below brings up the export dialog where you can fill in any required props.
frxreport1.Export(frxmailexport1);
if all are filled in correctly everything will be fine.
if you receive time out, login errors, or no attachments
check your email program settings and your firewall settings, they may be blocking access or attachment types.
I've get it working BUT...there seems to be a differens when
i use the dialog or no dialog. With dialog creates a .pdf, without
a fr3 file.
Which is the property to set the Format:=PDF ?
The other thing is that you can't create your own filename,
it's default the filename from the report !
Greetings
Peter
The problem i got was that you can't give the pdf file a other name
then the report name. This behavior exist when you're going to
use the frxMAILexport in combination with PDF creation.
You can't change the name of the .PDF file.
I've solved it by only using the PDFexport and use
the Indy components to mail the report. In that case you
can give the pdf file every name you want.
greetz
Peter