Using Template Selectors

Required Edition

Automation, Enterprise Automation

Using conditional printing, BarTender enables you to print different templates based on the data that is read from a database or entered into a data entry form. For example, suppose you are printing membership cards and you have some "gold" members, some "silver" members, and some "bronze" members. Rather than loading a different document for each membership type, BarTender enables you to automatically select which template(s) to use based on specified data conditions.

Template Selectors

A template selector is used to conditionally print only one template for each single customer, part, or other item you are printing. In the membership example above, you need to print only one card for each person applying for a membership. The card that prints will vary based on the membership type purchased, but you will never need to print multiple cards based on the conditional statement.

When using template selectors, you will need to create one template selector for each conditional statement; subsequently, you will add new templates to be included inside of the template selector. When you execute a print job, exactly one of the templates in the template selector will print based on the specified data.

ClosedTo create and use a Template Selector

  1. Select the icon on the main toolbar to open the Page Setup dialog. Alternatively, select Page Setup from the File menu or double-click on a blank area of the template.

  2. Click on the Templates tab.

  3. Select the directory where you wish to insert the new template selector. For special templates that print only at the beginning or end of a print job, select Start of Job Template(s) or End of Job Template(s). All other template selectors should be added to the Primary Template(s) folder.

  4. Click the icon on the template toolbar. Alternatively, select New Template Selector from the folder's context menu.

  5. In the Template Selector Properties section, specify the database field or data source value containing the name of the template to print in the Source for Template Name field.

  6. Add templates to the newly created template selector by dragging an existing template into it or creating a new one. For more information on creating templates, see Inserting a New Template.

  7. Click OK to close the Page Setup dialog.

The data contained in the selected Source for Template Name must match the name of one of the templates exactly. For example, suppose that the templates contained in the selected template selector are entitled "Gold Membership Card" and "Silver Membership Card". If the source is a database field, the information contained in the database must also be "Gold Membership Card" or "Silver Membership Card". If you wish to prompt the user for the template name at print-time, the data entry input must also match the name of the template(s). Consider using a dropdown list or radio button list to prevent data entry error at print-time.