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

Emailing report to multiple recipients

edited March 2009 in General
Hi,

I have an invoicing report which can be produced for an individual
customer or all customers(each customer is a group).
I have added email functionality via the print button on the print
preview window.

2 questions

1) When the report is produced for an individual customer I add the
customer's email address in the beforeprint event. This works fine
except I notice that this event fires twice. Not a big deal but is there
another event I can use that is more specific to the emailing function.

2) this is the main question.
When I create the invoices for multiple customers in the one report, it
would be nice to be able to send off multiple emails (one for each
customer) for this one report.
My initial thought was to tap into the beforegroupbreak or
aftergroupbreak and send the email at that point. Am I on the right
track or do I need to redesign the report to do this.

Cheers

Tony

Comments

  • edited March 2009
    I should add I am using D7 and RB10.06 (or perhaps RB10.09)
  • edited April 2009
    Hi Tony,

    1. Try using the OnInitializeParameters event. This should only fire once
    per print.

    2. When using the email feature, the report is generated first, attached to
    the email then sent. It is not currently possible to send an email during
    report generation. The best current option would be to loop through each
    recipient, emailing the report for each one.

    Note: RB 11 includes a feature to separate each group into a single file
    (such as PDF). This could allow you to generate a separate file for each
    group in a report automatically and email them individually in two steps.
    It is on our todo list to add separate email functionality to this feature
    so each group can be emailed separately in a single step.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2009
    Thanks Nico for the quick response, that gives me a few things to try.

    Cheers

    Tony

This discussion has been closed.