Named Data Sources Example

Named data sources enable you to use the same information across multiple objects, making it easier to use a piece of data in a document.

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 USPS POSTNET barcode. 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 data source, 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

  1. In the Toolbox, select the Data Sources tab to display the Data Sources pane.

  2. Over Named Data Sources, use the secondary mouse button to open the context menu.

  3. Select Manage Named Data Sources from the context menu to open the Named Data Sources dialog.

  4. Click to open the Create Named Data Sources dialog.

  5. Specify the desired name. In this example, we will call the first data source CustomerName. Once the name has been entered, click Next.

  6. Select Database Field from the dropdown list and click Next.

  7. From the list of available field names, select the desired database field. For the first data source, this will be "CustomerName".

  8. In the Sample Data field, enter some sample text to help you identify the data source. For example CustomerName might be "Jane Doe",

  9. Click Finish to close the Create Named Data Source Wizard.

  10. Repeat steps 4-9 to create named data sources StreetAddress1, StreetAddress2, City, State, and ZIP.

To attach the named data sources to the address

  1. From the main toolbar, click and select Multi-line.

  2. Click on the template to add the text object.

  3. Double-click on the text object to open the Object Properties dialog. Alternatively, select Properties from the object's context menu.

  4. From the Navigation Pane, select the first data source.

  5. Click to delete the existing data source.

  6. To add new data sources, click from the toolbar on the bottom of the Navigation pane to open the New Data Source wizard.

  7. In the New Data Source Wizard, select Link to an Existing Named Data Source as the Type.

  8. Click Next.

  9. For Data source, select the desired named data source (i.e. CustomerName).

  10. Click Finish to close the New Data Source Wizard.

  11. Repeat steps 6-10 for StreetAddress1, StreetAddress2, City, State, and ZIP, separating them with commas and carriage returns as needed.

  12. Click Close to close the Text Properties dialog.

Attaching ZIP to the POSTNET barcode

  1. From the main toolbar, click to add a barcode to the template. Alternatively, select Barcode from the Create menu.

  2. If this is the first time you have added a barcode, the Select Barcode dialog will automatically open. Otherwise, select More Barcodes to open the Select Barcode dialog.

  3. In the left pane, select Postal/Shipping to view the available postal barcodes.

  4. In the right pane, select USPS POSTNET.

  5. Click Select to close the Select Barcode dialog.

  6. Click at the desired location to add the barcode to your template.

  7. Double-click on the barcode to open the Barcode Properties dialog. Alternatively, select Properties from the object's context menu.

  8. In the Navigation Pane, select the available data source to display the Data Source property page.

  9. On the Data Source tab, select next to Type to open the Change Data Source Type wizard.

  10. For Type, select Link to an Existing Named Data Source.

  11. For Data Source, select ZIP.

  12. Click Finish to close the Change Data Source Type wizard.

  13. Click Close to close the Barcode Properties dialog.

Now the zip code will update dynamically in both the address and the barcode whenever a new value appears in the database.

Related Topics