Open topic with navigation
enable you to use the same information across multiple objects, making it easier to use a piece of data in a .
Consider the following example: a retail company prints a number of shipping labels where the address information is stored in a centralized database. In addition to printing the address on the label, the zip code will be encoded into a . Rather than connecting to the database field multiple times, we can create a single named data source that will be linked to each of the separate objects. By using a single , we reduce the chance of human error in the final product.
In this example, we will produce a label that draws information from the database, as in the sample data below:
"Customer Name", "Street Address 1", "Street Address 2", "City", "State", "Zip Code"
"Amy Jacobs", "PO Box 60", " ", "Gem Town", "NV", "50897"
"Will Wilson", "148 Circle Drive", "Apt. B302", "Maple", "WA", "98005"
"Katie Smith", "6582 Highland Road", " ", "Kansas City", "MO", "64052"
To create the named data sources
-
In the Toolbox, select the Data Sources tab.
-
Open the for the Named Data Sources node.
-
Select Manage Named Data Sources from the context menu to open the Named Data Sources dialog.
-
Click to open the Create Named Data Sources dialog.
-
Specify the name as ZIP. In this example, we will create only one named data source, for the zip code. This is the data that will be shared between multiple objects.
-
Select Database Field from the dropdown list and click Next.
-
From the list of available field names, select the database field that you want. Using the sample file above, the database field to use is "Zip Code".
-
In the Sample Data field, enter some sample text to help you identify the data source. For example ZIP might be "58631".
-
Click Finish to close the Create Named Data Source Wizard.
To create the address text object
-
From the main toolbar, click and select Normal Wrapped.
-
Click on the to add the text object.
-
Double-click on the text object to open the Object Properties dialog. Alternatively, select Properties from the object's context menu.
-
From the navigation pane, select the first data source.
-
Click to delete the existing data source.
-
Add a new data source for each database field in the data file, separated by spaces. To add new data sources, click from the toolbar on the bottom of the navigation pane to open the New Data Source wizard. For more information, refer to Working with Data Sources.
-
When you get to the Zip Code data source, select Link to Existing Named Data Source as the data source type. Click Next.
-
Select ZIP from the list of named data sources.
-
Click Finish to close the New Data Source Wizard.
-
Click Close to close the Text Properties dialog.
To link the zip code to the barcode
-
Add a barcode object to your template.
-
Double-click on the barcode to open the Barcode Properties dialog. Alternatively, select Properties from the object's context menu.
-
In the navigation pane, select the available data source to display the Data Sources property page.
-
On the Data Source tab, select next to Type to open the Change Data Source Type wizard.
-
For Type, select Link to an Existing Named Data Source. Click Next.
-
Select ZIP from the list of named data sources.
-
Click Finish to close the Change Data Source Type wizard.
-
Click Close to close the Barcode Properties dialog.
Now the zip code will update both the address and the barcode whenever a new value appears in the database.
Related Topics