Introduction
The BusinessCraft Printers menu (Security Setup > Printers) comprises three components:
Printers
Templates
Template Batches
Printers provides the ability to maintain printer queues used within BusinessCraft.
Templates provide customisable, user defined layouts for printed documents as distinct from reports. Initially, the primary purpose of a printer template was to define a layout to print to a printer. Over time other methods to output data have been added including Preview, PDF, Email and XML.
There are two distinct aspects to Printer Templates:
Setting up Printer Templates
Using Printer Templates
Setting up Printer Templates is usually carried out by an Administrator due to the technical aspects of setup, the considerations required in determining how Printer Templates will be used in various modules, the dependencies involved in certain aspects of Printer Templates (e.g. BusinessCraft Service) and the necessity to restrict access to directories that may contain sensitive information. (e.g. saved PDF copies of emailed Payslips)
Using Printer Templates is relatively straight forward providing the Printer Templates have been setup well and on the basis that users have been properly trained in the options available when using a Printer Template.
Template Batches provide the option to include multiple template codes for one template file into a Template Batch. Template Batches will be available for use wherever the template file on which that template batch is based is available.
Printers
Printers provides the ability to maintain printer queues used from within BusinessCraft. Default printer queues are created when BusinessCraft is installed, however these queues can be adjusted as required to suit specific requirements.
Go to Security Setup > Printers > Printers and the Printer Maintenance screen is displayed:
Printer Code | A 12 character field for the printer queue code |
Printer Name | A 30 character field for the printer queue name |
Printer Type | Indicates the type of printer queue. Options are Direct (D), Queue (Q), File (F), Export (X), Windows (W) |
Format | Indicates the printer format. Options are Standard 132 column (blank), HP Laser (A), Epson 80 Character (B) |
Device | Allows the specification of additional required information if Printer Type is not Windows e.g. LPT1 or ? to prompt for information. |
Final Form Feed | Indicates if a form feed is required at end of print (Y) or not (N) |
Suppress Preview | Indicates if Windows Print Preview is suppressed (Y) or not (N) |
Suppress Dialog | Indicates if Windows Printer Selection is suppressed (Y) or not (N) |
Windows Device | Only available if Printer Type is Windows (W). Used to enter/select the Windows Printer that will always be used for this Printer Queue. |
Printer Template Overview
Printer Templates are normally used for printing system documents such as Purchase Orders, Invoices, Remittances and Payslips. Multiple layouts can be defined for each Printer Template. For example, a layout for Printed Purchase Orders and another for Emailed Purchase Orders.
The primary purpose of a Printer Template is to run a report that gathers specified information from BusinessCraft and populates a predefined layout with that information to produce a specified system document.
Within the Printer Template there is a range of options to define what form the output of the Printer Template takes (e.g. Preview, PDF etc.), how it is delivered (Print, Email etc.) and what additional archive options are required (e.g. Save PDF to specified folder in specified sort order).
The format of each layout is customisable and is largely driven by the needs of the business.
BusinessCraft delivers generic printer templates when installed to provide a basis for assessment by customers so that specific layout requirements can be determined.
Template Files
Printer Templates are accessed from the Navigator by going to Security Setup > Printers > Templates and the Template Maintenance screen is displayed.
The Template Maintenance screen displays all available Template Files in the Sidebar. To the right of the Sidebar is the Template Code Panel which provides the ability to create, edit and delete template codes (layouts) for the selected Template File.
Each Template File can have multiple Template Codes. This is important to support different layouts:
For different purposes (e.g. different invoice layouts for different types of invoice) and/or
For different output options (e.g. Preview or PDF) and/or
For different output methods (e.g. Print or Email).
Template Code Overview
When a template code is created or selected, different fields will be displayed depending on the Output Option. Here are examples of Purchase Order Template Codes for a Preview/Print Purchase Order and an Email/PDF Template code to show the different fields that are displayed:
Print Purchase Order Template Code
Email Purchase Order Template Code
Template Code Fields
It is important to understand the purpose of each field displayed for a template code:
Template File | The Template File |
Template Code | The Template Codes for the Template File. Displays a combination of the Template Description and Code fields. |
Description | A user defined description for the template code. |
Code | A user defined single character template code used to select this Template Code when using the Template File in BusinessCraft either in Setup, Defaults, Master Files or when processing. |
Output Option | Select the Output Option for this Template Code from the drop-down list. |
Report Path and File Name | The Path and File Name of the report to run when this template code is selected. Registry variables (a directory shortcut) are supported. |
XML Path and File Name | The Path and File Name for XML data exports. |
PDF Path and File Name | The Path and File Name for created PDFs. (Tokens are supported). |
Email To | The To Email Address to send output. (Tokens are supported). |
Email CC | The CC Email Address to send output. (Tokens are supported). |
Email BCC | The BCC Email Address to send output. (Tokens are supported). |
Email Subject | The Subject Line for Email. (Tokens are supported). |
Email Reply Address | The Reply To Email Address for replies for this Template Code if different from the one defined in the SMTP Plugin in the BusinessCraft Service. |
Email From Address | The From Email Address for this Template Code if different from the one defined in the SMTP Plugin in the BusinessCraft Service. |
Email Body Path and File Name | The Path and File Name containing the Email Body Text. |
One Per Doc | Indicates if a separate layout is to be produced based on a new document key (Checked) or one layout (Not Checked). For example, emailing purchase orders would require this field to be checked so that one purchase order is produced per vendor. |
Auto Send | Indicates if the Email Dialogue Box is suppressed (Checked) or not (Not Checked). For auto-emailing documents, check this box. |
Archive Old | Indicates if an existing output file will be archived (Checked) or replaced (Not Checked). |
SMTP Mail | Indicates if the output is to be emailed using the BusinessCraft Service SMTP Add In (Checked) or not (Not Checked). |
Keep Backslashes | Prevents backslashes from being translated into commands (Checked) or not (Not Checked). |
Read Receipt | Indicates if a Read Receipt is requested when recipient opens the email (Checked) or not (Not Checked). |
Tokens | The Tokens Side Panel will display all available tokens when a field is accessed that supports the use of tokens. |
Adding a Template Code
After selecting the Template File (e.g. Purchase Order) to which are Template Code is to be added, click the Add Button. The first Template Code will be assigned blank and after that followed by 1 and incremented through single digits and then alphabet.
The Add process populates the Description field with the Code assigned followed by the word New:
The Description can be changed, however the Code assigned will remain unchanged (in this example blank):
Click the Save Button to create the Template. This results in the creation of a configuration file in the \MapDr\Printers folder with the name, in this example, of PORDER.TP – the third character in the extension is a blank.
If a blank code is not desired, change the blank (or last character to one required). In this case, it has been changed to an S:
Go back to the Template Maintenance window and find the Template File again (in this case Purchase Order) and the change made to the Template Code is reflected in the screen:
Deleting a Template Code
Select the Template Code to be deleted and click the Delete Button to the right of the Add Button.
Different Output Options in Template Codes
Depending on the output option selected, different fields will be displayed. Here is an example of a Printer Template Code defined to email which displays email related fields. In addition, for fields that support tokens, when that field is selected the tokens panel will show available tokens.
Setting the Default Template Code
Besides creating template codes as already described, there are setup options in each BusinessCraft module that uses Printer Templates that allow each source document to be configured to work as required.
For this example, go to Purchase Orders > Setup and ensure that the P/O Print field is set to P. This will mean that when a Purchase Order is printed, in the absence of any other settings or options, the Purchase Template Code P will be used automatically by the system.
Using Printer Templates
Purchase Orders have just been implemented and a Purchase Order Template Code (P) has been created to Preview/Print all Purchase Orders using a Crystal Report (porder.rpt) with the company logo, address details and the general layout required:
Printing all Purchase Orders
Go to Purchase Orders > Maintain > Purchase Orders, select a Purchase Order and use the Print (F6) function key to print the Purchase Order. If the Default/Custom Printer Template Option pop up is displayed, this means that there are Custom Templates already defined.
Choose Print All Records using the Default Template (D), which tells BusinessCraft to use the Default Template (in this case, P) defined in Purchasing Setup.
If the Default/Custom Printer Template pop up does not display, the system will proceed to print the Purchase Orders with no action needed by the user. Otherwise, the BusinessCraft Report Viewer is displayed with the Purchase Order presented on screen using the Default Template Code:
After reviewing the Purchase Order on screen, use the Print option in the Report Viewer Toolbar to print the Purchase Order.
Emailing all Purchase Orders
This requires a second Template Code for Purchase Orders, even if the layout is the same, as there are several configuration settings within the template code necessary for an email template code to work as required.
Create an Email Template Code
Go to Security Setup > Printers > Templates, select Purchase Orders and add a new printer template code. The system will generate a sequential number but this can be changed as previously explained by going to the MapDr\ Printer folder.
In this case, the Output Option is set to Email which triggers additional fields (which have been previously explained) to be displayed:
The PDF Path and Filename field has used tokens to save PDFs by Purchase Order Number. Other tokens can be used as required to suit specific requirements.
The Email To field contains VENEMAIL – what does this mean? Click in the field and the Tokens Panel displays available tokens and that VENEMAIL is a token for the Vendor’s Email Address. The Vendor’s Email Address will need to be recorded in the P/O Email Address field on Page 2 of the Vendor Maintenance screen for any vendors receiving Purchase Orders by email.
The Email Subject field has used Tokens to create a meaningful subject for the vendor when they receive the email.
It is very important to check the One Per Doc option to create one email per recipient, in this case, vendor to prevent email attachments being combined and sent to the wrong recipient.
Record the Vendor Email Address
Go to Accounts Payable > Maintain > Vendors and select the required Vendor. On Page 2, in the P/O Email Address field, record the email address to which purchase orders are to be sent for the vendor. Repeat the process for all vendors.
Change the Default Template Code
Go to Purchase Orders > Setup and change the P in the P/O Print field to an E. This will ensure that when a Purchase Order is printed, in the absence of any other settings or options chosen, Purchase Orders will be emailed.
Print Purchase Orders
Go to Purchase Orders > Maintain > Purchase Orders, select a Purchase Order and use the Print (F6) function key to print the Purchase Order.
If the Default/Custom Printer Template Option pop up is displayed, this means that there are Custom Templates already defined. Choose Print All Records using the Default Template (D), which tells BusinessCraft to use the Default Template (in this case, E) defined in Purchasing Setup.
If the Default/Custom Printer Template does not display, the system will proceed to email the Purchase Orders with no action needed by the user.
Nothing appears to have happened, other than a few messages that appear on screen. The BusinessCraft Service handles the process of automated emailing and on checking the folders used by the BusinessCraft Service, the Purchase Orders have been sent, each Purchase Order stored in a folder within the Sent Folder:
It’s worth noting at this point if the Auto Send option was un-checked in the printer template the Email Details box will display prior to emailing. This provides the user an opportunity to type a message on the fly, however this would appear for every Purchase Order to be emailed so is not practical for bulk emailing.
Prompt to Print or Email Purchase Orders
It is rarely practical to use either the Print or Email all approach. BusinessCraft provides an option to prompt for a template at the time of printing.
It is assumed that the two template codes for Purchase Orders (one for print, one for email) have been setup and P/O Email Addresses have been recorded for vendors who will receive Purchase Orders by email.
Change the Default Template Code
Go to Purchase Orders > Setup and insert a ? in the P/O Print field. This will ensure that when a Purchase Order is printed, in the absence of any other settings or options chosen, the user will be prompted to select a Purchase Order Template Code when printing Purchase Orders. The Template Code that the user selects when prompted will become the Default Template code for that print run.
Print Purchase Orders
Go to Purchase Orders > Maintain > Purchase Orders, select a Purchase Order and use the Print (F6) function key to print the Purchase Order.
Because the Print Template Code in Purchasing Setup has now been set to ?, the Select Default Printer Template prompt appears.
Select either the Purchase Order (Email) [E] or Purchase Order (Print) [P] Template Code. Whichever one is chosen will become the Default template for this print run.
If the Default/Custom Printer Template Option pop up is displayed, choose Print All Records using the Default Template (D), which tells BusinessCraft to use the Default Template that was just selected.
The Purchase Orders will print or email depending on which template code was chosen.
This solution will work in certain scenarios where documents are generally printed and occasionally emailed and there is a level of control over the document range being printed/emailed.
However, in bulk printing or emailing scenarios this is not a complete solution.
Automatically Print or Email Purchase Orders
The typical scenario usually encountered is that most recipients will have an email address and will accept documents via email, with a small number requiring printed documents. This option shows how to setup and use template codes to handle this process in an automated manner.
It is assumed that the two template codes for Purchase Orders (one for print, one for email) have been setup and P/O Email Addresses have been recorded for vendors who will receive Purchase Orders by email.
Set the Default Template Code
Go to Purchase Orders > Setup and set the template code in the P/O Print field to P. This will ensure that when a Purchase Order is printed, in the absence of any other settings or options chosen, the Purchase Order will be printed. As mentioned previously, this is the Default Template.
Set the Custom Template Code
Go to Accounts Payable > Maintain > Vendors and for each vendor to be emailed, record an E in the P/O Template code field. This is known as the Custom Template for that vendor.
Check on Page 2, that there is a valid email address for the vendor in the P/O Email Address field. Repeat the process for all vendors to be emailed.
Print Purchase Orders
Go to Purchase Orders > Maintain > Purchase Orders, select a Purchase Order for a vendor with a Custom Template and use the Print (F6) function key to print the Purchase Order.
When the Default/Custom Printer Template Option pop up is displayed, choose Print All using Custom Templates – where available (C), which tells BusinessCraft to use the Custom Template defined for the vendor if one is available. If there is no custom template for the vendor, the system will use the Default Template.
Purchase Orders will be printed/emailed to vendors depending on whether the vendor has a template code defined in the vendor master or not.
In this scenario, vendors with an E in the Vendor P/O Template Code field will be emailed, those with a blank in that field will be Printed in accordance with the Template Code in Purchasing Setup.
Print all Records using Both Default & Custom (B)
In the Default/Custom Printer Template Option pop up box, there is the Print All Records using Both Default & Custom Templates option which has not been explained in the previous scenarios.
Using the same scenario with an Email Template Code recorded for certain Vendors and a Print Template in Purchasing Setup, this option will:
Print all Purchase Orders and
Email Purchase Order to those Vendors with an E in the Vendor PO Template code field.
Select a Specific Custom Template to Print (S)
In the Default/Custom Printer Template Option pop up box, there is the Select a Specific Custom Template option which has not been explained in the previous scenarios.
Using the same scenario with an Email Template Code recorded for certain Vendors and a Print Template in Purchasing Setup, this option will look for the selected template entered in the Vendor P/O Template Code field and action only those Purchase Orders depending on how that template is setup (for example, Print or Email).
Using the same scenario, this is a good option to use when previously emailed Purchase Orders failed and need to be resent.
Template Batches
In certain circumstances, the options explained so far night still not address a specific requirement. Template Batches provide the ability to link one or more template codes for a template file to a Template Batch for that template file.
For example, users might inconsistently choose the correct option in the Default/Custom Printer Template pop up where it is required that the Purchase Order is always printed and emailed where an email address is provided. In this case a template Batch could be used to reduce the steps and confusion for the users.
Setting up Template Batches
Go to Security Setup > Printers > Template Batches and create a record in the Report Template Batches screen as shown:
Program | Enter/select a valid Template File |
Description | A 30 character description for the Template Batch |
Use the Lines (F5) function key to open the Batches screen for that Program and create one or more batches required for this Template File.
In this case, we have created just one batch that will be used to Print and Email Purchase Orders:
Batch Code | A 10 character user defined code for the batch. Needs to be the same as the Template code for the first line in the Batch. |
Description | A 30 character description for the batch displayed when printing |
With the batch selected with the cursor, use the Lines (F5) function key to open the Reports screen for that Batch for that Program:
Seq | A system assigned sequence number |
Template | Enter/select a valid Template Code for the Template File |
Description | The Template Code Description is shown but can be changed |
Set the Default Template Code
Template Batches will appear as an option when printing but only if the default template code is set to a ? so that the user can choose that option.
Go to Purchase Orders > Setup and insert a ? in the P/O Print field. This will ensure that when a Purchase Order is printed, in the absence of any other settings or options chosen, the user will be prompted to select a Purchase Order Template Code or if present a Template Batch when printing Purchase Orders. The Template Code/Batch that the user selects when prompted will become the Default for that print run:
Using Template Batches
Go to Purchase Orders > Maintain > Purchase Orders, select a Purchase Order and use the Print (F6) function key to print the Purchase Order.
Because the Print Template Code in Purchasing Setup has now been set to ?, the Select Default Printer Template prompt appears and the Template Batch appears as an option:
Select the Template Batch which will become the Default for this print run.
If the Default/Custom Printer Template Option pop up is displayed, choose Print All Records using the Default Template (D), which tells BusinessCraft to use the Default Template that was just selected.
The Purchase Orders will print and email based on the Template Batch selected.
Revision 2
10th December 2018