Board index » delphi » Reportbuilder - splitting report to email pdf to different email addresses

Reportbuilder - splitting report to email pdf to different email addresses


2007-08-01 03:44:53 PM
delphi206
Hi,
Apparently Reportbuilder doesnt support this in any native way. Therefore
I'm after some coding or component ideas from anyone who uses Reportbuilder
in terms of doing the following:
How I can split up a report to print each group to a different email address
automatically? The idea is, for example, that every employee will receive
their shift details. Each employee can have multiple pages therefore the
need to send by group rather than by page.
Thanks
Alex
 
 

Re:Reportbuilder - splitting report to email pdf to different email addresses

Al Vas brought next idea :
Quote
Hi,

Apparently Reportbuilder doesnt support this in any native way. Therefore
I'm after some coding or component ideas from anyone who uses Reportbuilder
in terms of doing the following:

How I can split up a report to print each group to a different email address
automatically? The idea is, for example, that every employee will receive
their shift details. Each employee can have multiple pages therefore the
need to send by group rather than by page.

Thanks

Alex
Well it all depends on how you have designed your report.
You could create a report with a subreport for the employ details
information using two data pipelines.
Setting the master pipeline, which has the employ data, properties
RangeBegin and RangeEnd to rbCurrentRecord, reCurrentRecord and the
detail pipeline to rbFirstRecord, reLastRecord would efectivelly give
the control to continue to the next employ to your application and you
can export one file for each employ.
I do not know how you have implemented your report so I can not comment
any fearther.
Regards
Yannis.
 

Re:Reportbuilder - splitting report to email pdf to different email addresses

Hi Alex,
I'm not clear how you are doing your report, but I can suggest one
possibility using one of our VCL products. It would help to see the PDF
output that you are generating at this point, to suggest better.
Generate the PDF as you generate now, then, using PDFtoolkit VCL you can
search for keywords in the PDF, get details of page number and so on, and
use the ExtractPagesTo command to split/extract selected pages into new PDF
files that will be emailed. PDFtoolkit handles the emailing action as well.
"Al Vas" <XXXX@XXXXX.COM>writes
Quote
Hi,

Apparently Reportbuilder doesnt support this in any native way. Therefore
I'm after some coding or component ideas from anyone who uses
Reportbuilder in terms of doing the following:

How I can split up a report to print each group to a different email
address automatically? The idea is, for example, that every employee will
receive their shift details. Each employee can have multiple pages
therefore the need to send by group rather than by page.

Thanks

Alex


 

Re:Reportbuilder - splitting report to email pdf to different email addresses

Hi Alex,
Though this is not a built-in feature of ReportBuilder, it is definitely
possible to achieve.
One option would be to create a routine that loops through each employee in
the dataset and calls Report.Print (or Report.SendMail) for each one. This
essentially creates and prints a separate report for each employee, removing
the need to separate the individual groups.
--
Regards,
Nico Cizik
Digital Metaphors
www.digital-metaphors.com
"Al Vas" <XXXX@XXXXX.COM>writes
Quote
Hi,

Apparently Reportbuilder doesnt support this in any native way. Therefore
I'm after some coding or component ideas from anyone who uses
Reportbuilder in terms of doing the following:

How I can split up a report to print each group to a different email
address automatically? The idea is, for example, that every employee will
receive their shift details. Each employee can have multiple pages
therefore the need to send by group rather than by page.

Thanks

Alex


 

Re:Reportbuilder - splitting report to email pdf to different email addresses

I did it in a project but you have to run ReportBuilder multiple
times.
I have a flag on each record (which could be just whether they
have an e-mail address entered). The first thing I do is I print
the report with a filter on the table to just get those without an
e-mail. Then I go to a second step that goes to each record
that has a e-mail address, sets the filter so we only see that
single record and run the same report sending it to the e-mail
address for that record. Then I take off the filter and go to the
next record that has an e-mail and set the filter so that I only
see that one record and run the report again sending to that
new e-mail address and so on (actually I use datasets referencing
the same table to make it so I don't have to change the filters)
It works ok. If you find a better solution, I'd like to hear
about it.
Thanks,
J. Gordon
"Al Vas" <XXXX@XXXXX.COM>writes
Quote
Hi,

Apparently Reportbuilder doesnt support this in any native way. Therefore
I'm after some coding or component ideas from anyone who uses
Reportbuilder in terms of doing the following:

How I can split up a report to print each group to a different email
address automatically? The idea is, for example, that every employee will
receive their shift details. Each employee can have multiple pages
therefore the need to send by group rather than by page.

Thanks

Alex