Conditional Printing with layers (Video - 4:14)

 
Applies to: BarTender 2016

Overview

This article will explain how to set a layer to conditionally print.

Conditional printing allows you to set specific conditions under which an object on your document will print. Consider the following example. You run a medical device company who distributes directly as well as through a third party.  The labels need to be identical except for which company is distributing the product. By using conditional printing and monitoring the value of a named data source on your template, you can use the same template for both shipping labels. When you print the manufacturer's shipping label, the manufacturer's logo is printed. Likewise, when you print the third party's shipping labels, their respective logo and company name will be printed.

Conditional statements are defined using the When to Print dialog and can be based off of a complex expression or the value of a single data source. All conditional statements in BarTender contain a data source, followed by an operator and an optional value. Complex expressions may also contain one or more conditional joiners.

For more information please review the following resources:

Overview of Conditional Printing (Product documentation)

Overview of layers (Product Documentation)

Introduction to conditional printing

Introduction to layers (Video - 7:09)

 

 

How to set a layer to conditionally print

This example uses a sample document to show how to conditionally print layers.  The sample document is set up to print different layers depending on whether the manufacturer is distributing the product, or a third party distributor is distributing the product.

Downloads
Sample_Conditionally Print Layers.btw

  1. Open the sample document
  2. Note that there are two layers in the Layers Toolbox: "Third Party" and "Manufacturer"
  3. There is a named data source called "Distributor" that will be used to control which layer is printed
  4. On "Form1", there is a List Box Control linked to the named data source "Distributor" which sets the value at print time.

Tip: Instead of using a List Box Control for conditional printing based on user input at print time, you can link a database field to the named data source "Distributor" for conditional printing based on a database field.

For more information on using a database refer to Getting started with database connections (Video - 5:20)

  1. Open Layer Properties for the layer "Third Party"
  2. On the Print Options tab, click the hand icon next to Print When
  3. Set When to print "Third Party" to "Conditionally, based on data source: Distributor Equals Third Party"
  4. Click ok to close When to print. Click ok to close the Layer Properties
  5. Open Layer Properties for Manufacturer, and set When to print "Manufacturer" to "Conditionally, based on data source: Distributor Equals Manufacturer"
  6. Click ok to close When to print. Click ok to close the Layer Properties
  7. You are now done setting up conditional printing for each layer
  8. To test the condition, open Print Preview
  9. Select "Manufacturer" as the Distributor and click Preview
  10. Only the Manfufacturer layer shows in the print preview due to the condition
  11. Close Print Preview, and then start another Print Preview
  12. Select "Third Party" as the Distributor and click Preview
  13. Only the Third Party layer shows in the print preview due to the condition

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.