3000AD Knowledge Base
Home » Categories » Knowledge Base Home » PDF-eXPLODE » Tips N Tricks

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)

  • Run report #1 and print to any PDF writer (like Cute PDF or PDF995 or Bullzip)  other than PDF-eXPLODE and save it with any name of your choice. This multi-page PDF must contain the PDF-eXPLODE tag.  

    Use of a third party PDF creator ensures that no 'exploding activity will take place at the moment.

  • Run report #2 and print to the PDF writer used in the previous step and save it with any name of your choice.
  • Now open PDF-eXPLODE and select Logging and Utilities in the Options menu. Under PDF utilities, click on the  Combine PDF button. When this screen opens, pick  the File path and name of the PDF from Report #1 and insert this under Input PDF1 ; likewise enter the file path and name of the PDF from report #2 into the Input PDF2  field.
  • Enter a suitable file path and name for the Output PDF where report #1 and #2 will be combined. Click on the Combine PDF button. The 2 reports will be combined into one PDF with the name nominated under Output File Name. 
  • Open PDF-eXPLODE so that the Print Queue screen displays. Now left click on the newly created combined PDF and hold the button down while "dragging" the PDF till it is over the open PDF-eXPLODE print queue window. The cursor should turn into a PLUS, now release your finger off the left mouse button to "drop" the PDF. Exploding and then emailing should commence straight away.  PDF-eXPLODE will sort and combine all pages with the same (identical) tag and email it as one PDF attached to one email.
  • If the cursor displays as a circle (rather than a Plus) with a diagonal line through it, it means your PC s is not set up for drag and drop of PDFs onto PDF-eXPLODE. Please see this article ( http://kb.pdf-explode.com/article.php?id=38 ) to rectify the setting in your PC registry

 

 

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. 

 

Comments Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code

Subscribe to Knowledge Base

Get notified when new articles are added to the knowledge base.