How do I print documents that have no e-mail address?

ISSUE:

Some of the Clients may not have email addresses. So processing a whole batch of invoices where only some of them have email addresses, need not be a processing problem. Where an Invoice has no email address, it is necessary to Print and mail the invoice to the client via the post. How do you achieve a solution that suits email and print?  


ANSWER:

If the Database has no email address for the Client and you want to print those invoices, then the following technique will produce a single file containing all documents to be printed. (If you want each document to be in a separate exploded PDF, use a Variable for the file name).

Create a Default Message ID called Print1 – not PRINT as this is a “reserved “ word in Windows. For this Print1 , check the  Print check box and select PRINT ONLY and nominate a printer. Now allocate a folder where the exploded PDF for Print Only will be saved and you can (optionally) give this exploded file a name here. Now click APPLY. 

In your Crystal Reports (it will be somewhat similar in MS Access report writer) write a formula with If Then Else logic –something like this:

If Trim({email_addr}) <> “” Then
     "<pdfexplode>"+{email_addr}+"</pdfexplode>"
Else 
    "<pdfexplode>Print1#</pdfexplode>"


To test, make the tag visible and run the report as a preview to the screen and check where the pages have no email address and verify that the Print tag actually looks like this:

     <pdfexplode>Print1#</pdfexplode>

If OK, make the tag invisible and run the Print and verify that PDFs go to the printer

Alternatively, you could have a non-email tag (like PRINT_THESE) to replace the defined Message ID "Print1" without the need to define it. This is a non-email tag cannot be emailed, but will still create an exploded PDF. This Exploded PDF can be printed by manually  opening it at the end of the process run.This is the formula to create a a non-email tag:

If Trim({email_addr}) <> “” Then
     "<pdfexplode>"+{email_addr}+"</pdfexplode>"
Else
     "<pdfexplode>PRINT_THESE</pdfexplode>"

A “PRINT_THESEyymmdd_hhmm.PDF” or “PRINT_THESE_yymmdd_hhmm.PDF” will be created in the default Mail exploding folder and if NO suppression of Date/Time on the filename. Then open this PDF and file/print later.

Posted - Fri, Dec 5, 2014 at 1:10 PM. This article has been viewed 1743 times.
Online URL: https://kb.pdf-explode.com/article/how-do-i-print-documents-that-have-no-e-mail-address-47.html

Powered by PHPKB (Knowledge Base Software)