Conditional Printing

Conditional printing enables you to set specific conditions under which an object on your document will be printed. Consider the following example:

You are running the pro shops for two separate sports teams, Team A and Team B, using the same basic framework. The shipping labels are identical except for the logo. By using conditional printing and by monitoring the value of a named data source on your template, you can use the same template for both shipping labels. When you print Team A's shipping label, the Team A logo appears on the label, and when you print Team B's shipping labels, the Team B logo appears.

Conditional statements are defined by using the When to Print dialog and can be based on a complex expression or on the value of a single data source. All conditional statements in BarTender contain a data source that is followed by an operator and an optional value. Complex expressions may also contain one or more conditional joiners. The following charts describe the functionality of these components.

Some of the conditional joiners and operators that are listed are specific to the When to Print dialog, and some are common to other conditional expressions that you can create in BarTender. For more information about how to build your own conditional expression, refer to Building Conditional Expressions.

ClosedConditional Joiners

Conditional joiners enable you to join two or more separate conditional statements to form a new criteria.

   

Conditional joiner

Description

And

When two or more conditional statements are joined by an "And" joiner, all conditional statements must be met to run the instruction.

Or

When two or more conditional statements are joined by an "Or" joiner, one or more of the conditional statements must be met to run the instruction.

Not And

When two or more conditional statements are joined by a "Not And" joiner, the instruction is run if at least one of the conditional statements is unmet. If all the conditional statements are met, the instruction is not run.

Not Or

When two or more conditional statements are joined by a "Not Or" joiner, all of the conditional statements must be unmet to run the instruction.

ClosedOperators

Operators determine the relationship that you want between the data source and the value. Conditional expressions are structured just like a sentence, namely "subject (data source)" "verb (operator)" "object (value)." You can use the following conditional operators to control both the printing of objects, layers, templates, or backgrounds and the suppression of data sources. The following table describes the valid data types that can be used with each conditional operator.

   

Conditional operator

Valid inputs

Example

Equals

All types except Time, Binary, and Picture

[data source] Equals <value>

Does not equal

All types except Time, Binary, and Picture

[data source] Does Not Equal <value>

Is greater than

All types except Time, Binary, and Picture

[data source] Is greater than <value>

Is greater than or equal to

All types except Time, Binary, and Picture

[data source] Is greater than or equal to <value>

Is less than

All types except Time, Binary, and Picture

[data source] Is less than <value>

Is less than or equal to

All types except Time, Binary, and Picture

[data source] Is less than or equal to <value>

Is between

All types except Time, Binary, and Picture

[data source] Is between <value 1> and <value 2>

Is not between

All types except Time, Binary, and Picture

[data source] Is not between <value 1> and <value 2>

Contains

Text only

[data source] Contains <value>

Does not contain

Text only

[data source] Does not contain <value>

Begins with

Text only

[data source] Begins with <value>

Ends with

Text only

[data source] Ends with <value>

Is like

Text only

[data source] Is like <value>

Is not like

Text only

[data source] Is not like <value>

Is blank

All data types

[data source] Is blank

Is not blank

All data types

[data source] Is not blank

Is any of

All types except Time, Binary, and Picture

[data source] Is any of <value 1>, <value 2>, <value 3>...

Is none of

All types except Time, Binary, and Picture

[data source] Is none of <value 1>, <value 2>, <value 3>...

 

Is beyond this year

Dates only

[data source] Is beyond this year

 

Is later this year

Dates only

[data source] Is later this year

 

Is later this month

Dates only

[data source] Is later this month

 

Is next week

Dates only

[data source] Is next week

 

Is later this week

Dates only

[data source] Is later this week

 

Is tomorrow

Dates only

[data source] Is tomorrow

 

Is today

Dates only

[data source] Is today

 

Is yesterday

Dates only

[data source] Is yesterday

 

Is earlier this week

Dates only

[data source] Is earlier this week

 

Is last week

Dates only

[data source] Is last week

 

Is earlier this month

Dates only

[data source] Is earlier this month

 

Is earlier this year

Dates only

[data source] Is earlier this year

 

Is prior this year

Dates only

[data source] Is prior this year

 

All date and time operators describe the relationship between the current system date and the data source. For example, if a layer is set to be printed conditionally based on the conditional expression "[data source] Is earlier this month", the layer is printed only if all of the following conditions are true:

  • The data source value is in the current month.

  • The data source value is not yesterday.

  • The data source value is not in the current week before yesterday.

  • The data source value is not last week.

In This Section