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.
|
|
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. |
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:
|
Building Conditional Expressions
In programming, a conditional expression is a set of rules that are performed if a certain condition is met. Conditional expressions include one or more data sources, an operator, and a value. You can use conditional expressions with the When to Print dialog for conditional printing, with the When to Show dialog for data entry forms, with the Database Setup dialog's Multi-Database Join view for joining multiple databases and tables into a single record, in the Database Setup dialog's Filter view for creating custom filters, and in the Suppression dialog.
The When to Print dialog determines specific conditions in which BarTender will print a given object, layer, template, or background.