Bulk Email Report

Hi,

With fast report, I am generating a report that contains my clients states of account. Each report is separated by a page break.

I would like to enable my users to send generated states of accounts to multiple clients at once. I know fast-report has the option (with frxMailExport) to send a single report to an address. But I don't think the option to send multiple reports to multiple recipients is implemented.

Any idea on how to achieve this?

Comments

  • gpigpi
    edited 7:32PM
    I think you should set TfrxPDFExport.PageNumbers and TfrxMailExport.Address properties
  • edited 7:32PM
    gpi wrote: »
    I think you should set TfrxPDFExport.PageNumbers and TfrxMailExport.Address properties

    ?

    I've got a similar issue.

    My report contains a number of pages. Each page is relevant for one single customer only. I'd like to have each report page e-mailed as PDF attachment to a single customer. What's the best way to achieve this?
  • gpigpi
    edited 7:32PM
    frxPDFExport1.PageNumbers := '1';
    frxMailExport1.Address := 'address1@gmail.com';
    frxReport1.Export(frxMailExport1);
    frxPDFExport1.PageNumbers := '2';
    frxMailExport1.Address := 'address2@gmail.com';
    frxReport1.Export(frxMailExport1);
    
  • edited 7:32PM
    Thanks, gpi. The logic makes sense.

    Part of the logic, then, will also be to keep track of what page number should be associated with which email address. Or is there a way to access a field's contents - say the field containing the email address - (in the report document) from within Delphi?
  • gpigpi
    edited 7:32PM
    Create user function and call it to send start and end pages to Delphi from report
  • edited 7:32PM
    Having 5+ reports in its own tab of preview.

    How to mail these reports as separate pdf in one email to a client?
    So one email gets 5+ attachments.

    Can this be solved with user function also?
  • gpigpi
    edited 7:32PM
    Bimmer_R wrote: »
    Having 5+ reports in its own tab of preview.

    How to mail these reports as separate pdf in one email to a client?
    So one email gets 5+ attachments.

    Can this be solved with user function also?
    Try to play with FileNames in the TfrxMailExport.OnSendMail. If this doesn't help - modify FR's sources

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.