Export to PDF and then export to Mail

mierlpmierlp Netherlands
edited 4:55AM in FastReport 3.0
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

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:55AM
    don't export to pdf first
    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.
    ;)
  • mierlpmierlp Netherlands
    edited 4:55AM
    Hi,

    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
  • gordkgordk St.Catherines On. Canada.
    edited 4:55AM
    here is a sample
    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.
  • mierlpmierlp Netherlands
    edited 4:55AM
    Hi,

    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 ? ;)
  • mierlpmierlp Netherlands
    edited 4:55AM

    The other thing is that you can't create your own filename,
    it's default the filename from the report !

    Greetings
    Peter
  • mierlpmierlp Netherlands
    edited 4:55AM
    Hi,

    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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.