Can I combine 2 different reports into one exploded PDF and one email?
ISSUE:
I have two different reports which usually are run separately and emailed to the recipients of the reports. The recipient of both reports are the same Clients. Instead of receiving two emails with attachments, I would like to combine the reports into one exploded file and emailed to each Client as one run. Can this be achieved with PDF-eXPLODE?
ANSWER:
This solution cannot be achieved as one run because the reports are totally independent of each other and need to be run to produce the exploded PDF output. If you need to achieve this as one run, you may be able to make one report a "sub-report" of the other in your report writer. Then the report run would consist of one process run. You must however, have a tag which is the same in both the main report and the sub-report. Then the pages from both the report and sub-report will be combined into one exploded PDF and sent as one email in one run.
However, if you are unable to adjust your reports, it may be easier to consider this work around in PDF-eXPLODE. There are two possible solutions in PDF-eXPLODE one of which can be scheduled so the report running will not require any User involvement and will be as near as automated as possible and appear to the email recipient User as "one" run. The end result will be one exploded PDF and one email.
The suggested solution 2 only applies to PDF-eXPLODE V4.0.16.97 or later. If you have a current Support plan as well as Version 4, and you want to implement this solution, you will need to write to mail@3000ad.com.au requesting a download link for V4.0.16.97.
Suggested Solution 1: (applies to V 3 onwards)
Suggested Solution 2: (only applies to V 4.0.16.97 Dec 2014 or later)
- Set up a new Message ID called Report1 (or another one-word name of your preference). Leave Email subject/message settings blank as we will not email this report. On the Attachment tab, configure the following: Check 'Suppress Date-Time on...' and 'Do not send e-mails...' so that the exploded file name will be fixed and the exploded PDF will not be emailed. Also configure the Exploded File Path under Exploded File tab to show the exploded PDF folder - see the screen images here:
- Set up another Message ID called Report2 to use for Report 2. In this Message ID, we will use the Variable tab to link the Report 1 exploded PDF to the Report 2 PDF. On the Attachments tab, ensure that all check boxes are unchecked. See the screen images for Report2 Message ID below:
- Run the Report 1. It must have a tag as follows: <pdfexplode>{ClientID}%Report1#</pdfexplode> This tag has one 'File' Variable with a value of the Client ID. This tag is linked to the Message ID Report1 by using the text "Report1#". This report will explode only and save a file for each ClientId included in the report's data set. This is an example of the Client ID file 3000ADSYS.PDF and saved to C:\PDF-eXPLODE\EXPLODED PDFs\Report1 folder.
- Once Report 1 is completed, run Report 2. The tag in Report 2 must look something like this: <pdfexplode>{InvoiceNo},{ClientID},{ClientID}.PDF%Report2#{Email_addr}</pdfexplode> There are three variables from the database in the tag. Variable 1 is the Invoice No, Variable 2 is the Client ID which will create a sub-folder under the preconfigured exploded Path : C:\Program Files (x86)\PDF-eXPLODE\COMBINED PDFs\, Variable 3 is the Client ID + ".PDF" file name for the file created from running report 1 into folder C:\PDF-eXPLODE\EXPLODED PDFs\Report1\ . Your Variables configuration should look like this:
- When report 2 is run, it will "pick up" [Client ID].PDF produced by running report 1, and previously saved to the folder nominated under the Report 2 Variable tab. This PDF will be inserted into the back of the Invoice PDF produced by Report 2. The combined PDF will be emailed to the email address shown in the tag as {email_addr}
- As a rough guide, Report 1 with 250 pages to explode would take roughly 5 minutes subject to available RAM and a hi-speed Intel processor.You could schedule Report 2 to run after Report 1, about 20-30 minutes apart.
Article ID: 55
Created On: Mon, Dec 22, 2014 at 11:08 AM
Last Updated On: Wed, Jan 7, 2015 at 5:24 PM
Online URL: https://kb.pdf-explode.com/article/can-i-combine-2-different-reports-into-one-exploded-pdf-and-one-email-55.html