Removing blank lines conditionally
Your label might accommodate six lines for an address:
Name
Business
Suite, building, mailstop etc.
Street
City, State, and Zip
Country
However, many addresses have only three lines, which usually results in blank lines in the address, like this:
Minisoft
1024 First Street
Snohomish, WA 98290
The procedure to remove the blank lines depends on how you set up your project, but in each case you create a test condition to determine whether a variable is empty.
You can also create a condition to test for a particular value. For example, if you have a variable Country that you want shown only when the value is not USA, you can create a condition to test that. The country will display for the value Canada, but not for the value USA.
Variables in separate paragraphs
This configuration is shown on the right. If the third variable (named Suite in this example) has no value, a blank line is shown. To eliminate the blank line, create a condition on the paragraph that contains the variable:
- Right click the paragraph that has the variable > Add AND Condition > Is not equal to.
- Select the variable in the Data Condition window. This example uses the variable name Suite.
- Constant is already selected. Leave the text area blank. Click OK. When the variable Suite is blank, the paragraph will be omitted, and no blank line will show.
You can see two conditions added in the following image. The first condition on variable Suite tests whether the variable is blank. The second condition on variable Country tests whether the variable is USA. The variable contents are only shown if the variable is not set to USA.
In a paragraph with line breaks
This image on the right shows this configuration. You cannot remove the blank lines from this configuration because line breaks cannot have conditions defined on them.