How can I automatically send my exploded PDF to a printer when there is no email address?


 

ISSUE:

We are still switching over to email invoices and several hundred accounts in our system now have an email address entered for crystal reports to pull info from for the tag,However there are still about 900 accounts that do not have an email address and having to enter NoEmail into the database field (which could then be assigned to a Client ID and configured to 'Print') would be a hideous task. We have an AS400 running JDE.  Crystal Reports, using a database driver, is capable of creating our Invoices. Is there a way we can use a blank tag to trigger a PDF to be auto printed?... or do you know of a method for crystal reports to auto fill a blank field with NoEmail? 

 

  ANSWER:

 

The method suggested below is very simple and can be done in 10-15 minutes.  It involves making changes to your Crystal Report first, then matching the PDF-eXPLODE Tag created in the report with a PDF-eXPLODE configuration.

 

 

CRYSTAL REPORTS TEMPLATE CONFIGURATION

 

  1. Open the CR designer interface with the desired report
  2. Right click on the Formula Fields and select NEW to create a PDF-eXPLODE Tag .  Call this formula PeXTag

Creating a new formula

3. The formula editor screen opens and you create a formula like this.

EXPLANATION :

If the {email_address} = "" then 

   '<pdfexplode>' + {order-number} + '%' + 'NoEmail#' + '</pdfexplode>'    //the order-number or invoice-number will be used to create a file name for the exploded PDF and the NoEmail# is a Message ID configured to send the PDF to any printer

else

   '<pdfexplode>' + {order-number} + '%' + 'NoEmail#' + '</pdfexplode>'  

Formula editing screen

        In the formula above I say

show the PeX Tag as <pdfexplode> + Invoice no (it is numeric so it must be converted to text) + % (which means the end of PeX Variables + a Message ID called “NoEmail”  ( which we have yet to configure in Pex)  + “#” ( to indicate that the word in front of # is a Message ID) + closing tag </pdfexplode>. The invoice no is used as a variable to filename the PDF as

 there is a non-blank email address and hence construct the tag and include the email address – this tag is connected to another Message ID called “Invoices” and followed by “#” (to indicate that the word “Invoices” is a message ID, then followed by the email address which is the delivery destination of the Invoices

 

 

  Crystal Reports designer

 

 

PDF-eXPLODE CONFIGURATION  

  PDF-eXPLODE Options

Variables Options setting

 

 

Message ID Options

 

 

Email Configuration

 

 



Article ID: 73
Created On: Mon, Sep 12, 2016 at 12:43 PM
Last Updated On: Sat, Apr 25, 2020 at 7:57 PM

Online URL: https://kb.pdf-explode.com/article/how-can-i-automatically-send-my-exploded-pdf-to-a-printer-when-there-is-no-email-address-73.html