Data Sources Property Page

When you work with text, barcode, and encoder objects, you can specify data source options on the Data Sources property page. When you do this, you can control whether the data that is printed on your items is entered at the keyboard, read from an external database, or received from one of a number of other possible sources.

ClosedTo open the Data Sources property page by using the Object Properties dialog

  1. Open the Object Properties dialog. To do this, double-click the object. Alternatively, click Properties on the object's context menu. The object's data sources are listed in the left navigation pane under Data Sources.

  2. Click a data source in the list to open the Data Sources property page, where you can view and configure the property settings for the selected data source.

ClosedTo open the Data Sources property page by using the on-screen editing context menu

  1. Click inside the text object.

  2. Open the context menu by right-clicking an existing data source, and then clicking Properties.

When you open the context menu from a data source that is not Embedded Data, you can also click Data Source Properties to open the Data Sources property page as a separate dialog. When you open the property page by using this method, the page does not include the data sources toolbar. For more information about the options that are available on this context menu, refer to On-Screen Editing Context Menu.

The Data Sources property page includes the following tabs.

ClosedData Source Tab

Use the Data Source tab to specify the name and data source type for the data source that is currently selected in the navigation pane. It includes the following options:

The remaining properties on this tab vary depending on the data source that is specified by the Type property.

ClosedEmbedded Data

The following property is available when Embedded Data is selected for the Type property:

  • Embedded Data: Specifies the data source value that you want the object to print for this data source each time the object is printed. Click in the input box, and then enter the value that you want.

If you enable data entry for an Embedded Data data source, the Embedded Data field becomes the Default Reply. The default reply specifies the initial text that appears inside of the corresponding control on the data entry form.

ClosedClock

The following properties are available when Clock is selected for the Type property:

  • Use Printer's Clock: Retrieves the date and/or time from the printer's clock instead of from the system clock on the computer.

  • Printer Clock Options: Opens the Printer Clock Options dialog, where you can configure how BarTender responds if the printer clock is not available at print time.

To use the printer's clock, you must select a device-based font on the Font property page. All data sources within the selected object must use the same printer font for this option to be enabled. Additionally, if you decide to use the printer's clock, you cannot refer to the clock data source in a custom VBScript.

ClosedDatabase Field

The following properties are available when Database Field is selected for the Type property:

  • Field Name: Specifies the field from your database that replaces the sample data for the currently specified data source.

  • Sample Data: Specifies the data that is displayed on the template if BarTender cannot connect to the database.

  • Update record when data source changes: Specifies that when the data source value is serialized or otherwise updated during a print request, the data source writes the new value back to the database. The value that is written back to the database includes the effects of all transforms except for Character Template and Prefix and Suffix. The new value is written back to the database regardless of whether the print job is successful.

  • Lock during print job: Specifies that individual records (when possible) or the table is locked during the current print job, which prevents other print jobs from reading the record or table before it is updated. This option is automatically selected when Update record when data source changes is selected.

    The Update record when data source changes and Lock during print job options are not available with text, SAP IDoc, XML, OLE DB, ODBC, and Microsoft Excel databases. To use these data update options on supported database formats, the following conditions must be met:

    • You must have write permission for the table or database.

    • The primary key must be available on the table.

    • The selected field must not be the primary key.

  • Database Connection Setup: Opens the Database Setup dialog, which you can use to configure the connection that BarTender has to an external database.

  • Type Conversion: Opens the Type Conversion dialog, which you can use to convert data from one type to another, such as converting from a number to currency. Available after you select a Type on the Data Type tab.

ClosedLibrary Phrase

The following properties are available when Library Phrase is selected for the Type property:

  • Library: Specifies the phrase library that the template object is currently connected to. You can use the options in this list to use a different connected phrase library, to connect to another existing phrase library, or to create a new phrase library to connect to.

  • Phrase ID: Specifies the phrase from the connected phrase library that is used for the data source. To change the phrase, click to open the Select a Phrase dialog.

  • Language: Specifies the language that the specified phrase will be printed in at print time.

  • Configure Languages: Opens the BarTender Document Options dialog to the Languages tab so that you can configure the languages in the document and specify whether they are to be available for selection at print time.

  • Preview: Provides a preview of the text.

ClosedGlobal Data Field

The following properties are available when Global Data Field is selected for the Type property:

  • Field Name: Specifies the name of the global data field. Select the name that you want in the list.

  • Global Data Field Properties: Opens the Global Data Fields dialog, where you can configure the properties for the selected global data field.

ClosedObject Value

The following properties are available when Object Value is selected for the Type property:

  • Object Name: Specifies the object whose data is read.

  • Value: Specifies the data that is read into the selected data source. Available options include the following:

    • Main Data Source: Specifies that the entire contents of the referenced object are read.

    • Human Readable Text: Specifies that only the human readable character data of the referenced object is read. Available for barcode objects.

    • Primary Data: Specifies that the data that is contained within the first data source of the referenced object is read. Available for GS1 Composite barcode objects only.

    • Secondary Data: Specifies that the data that is contained within the data source that follows the separator of the referenced object is read. Available for GS1 Composite barcode objects only.

    • Primary Human Readable Text: Specifies that the human readable character data of the first data source of the referenced object is read. Available for GS1 Composite barcode objects only.

    • Secondary Human Readable Text: Specifies that the human readable character data of the data source that follows the separator of the referenced object is read. Available for GS1 Composite barcode objects only.

    • Hexadecimal Encoded Data: Specifies that the RFID Hexadecimal Encoded data of the referenced object is read, if it is available.

ClosedPrint Job Field

The following property is available when Print Job Field is selected for the Type property:

  • Field: Specifies the print job field that you want to use as the data source value. The following print job field types are available.

    Print Job Field Type

    Description

    Application Edition

    The edition of BarTender (for example, Enterprise, Automation, and Professional)

    Application Version

    The version of BarTender (for example, 2016 R4, 2016 R7, and 2019)

    Computer Name

    The name of the computer on which BarTender is currently running

    Database File Name

    The name of the database file to which the BarTender document is connected

    Document Comment

    Any comments that are attached to the document's metadata

    Document Last Modified Time

    The last time the document was modified

    Document Latest Save Number

    The number of times the document has been saved

    Document Name

    The name of the document

    Document Revision

    The current revision number of the document

    Page Number

    The current page number

    Printer Model

    The model of the printer that will print the document

    Printer Name

    The name of the printer that will print the document

    Printer Port

    The port that is associated with the printer that will print the document

    Print Job Name

    The name of the print job that includes the document

    Print Job Start Time

    The start time of the print job

    Printed Template Number

    The number of the template on the page layout

    Printed Template Numbers on Page

    The range of templates on the page

    Record Number

    The record number of the document

    Record Numbers on Page

    The range of record numbers on the page

    Total Number of Pages

    The number of pages to be printed

    Total Number of Printed Items

    The total number of printed items on the page

    Total Number of Records

    The total number of records on the page

    Template Name

    The name of the template

    User Name

    The Windows user name that is associated with the document

ClosedExternal File

The following properties are available when External File is selected for the Type property:

File Source

  • Specify file name: Imports the contents of an external file into the data source.

    • File Name: Specifies the path and file name for the external file.

    • Select File: Opens the Select External File dialog, which you can use to browse to the external file.

  • Get file name from database field: Specifies the external file to use by retrieving the file name from a database field. When you do this, you can dynamically select an external file based on the contents of the database that is connected to your document.

    • Field Name: Specifies the field from your database that provides the path and/or file name of the external file.

    • Database Connection Setup: Opens the Database Setup dialog, which you can use to configure the connection to an external database.

    • Default Path: Specifies the path to the external file when it is not provided in the database field.

    • Select Path: Opens the Browse for Folder dialog, which you can use to browse to the directory location of the external file. When you select a location, BarTender automatically updates the Default Path field with the selected path.

  • Get file name from named data source: Specifies the external file to use by retrieving the file name from the contents of a named data source in your document.

    • Named Data Source: Specifies the named data source that provides the path and/or file name of the external file.

    • New Data Source: Opens the Create Named Data Source dialog, which you can use to create a new named data source.

    • Default Path: Specifies the path to the external file when it is not provided in the value of the named data source.

    • Select Path: Opens the Browse for Folder dialog, which you can use to browse to the directory location of the external file. When you select a location, BarTender automatically updates the Default Path field with the selected path.

  • Encoding: Specifies the encoding scheme that the data source uses.

ClosedVisual Basic Script

The following properties are available when Visual Basic Script is selected for the Type property:

  • Script Type: Specifies the type of VBScript to use. Depending on your needs and technical expertise, three different levels of VBScript are available. For more information, refer to Using VBScript as a Data Source Type.

    • Single-Line Expression: Specifies that a single-line VBScript is run to produce the data source value.

    • Multi-Line Script: Specifies that a multiple-line VBScript is run to produce the data source value.

    • Event Control Scripts: Specifies that advanced event control scripts are run to produce the data source value.

  • Expression: Provides an input box to enter the single-line VBScript that you want to run. Available when you select Single-Line Expression for the Script Type.

  • Script: Provides an input box to enter the multiple-line VBScript that you want to run. Available when you select Multi-Line Script for the Script Type.

  • Output: Displays the data source value that results from the VBScript expression or script that you entered in the input box. Available when you select Single-Line Expression or Multi-Line Script for the Script Type.

  • Edit with Script Editor: Opens the Script Editor, which you can use to write, store, and run VBScript.

ClosedPrinter Code Template Field

The following properties are available when Printer Code Template Field is selected for the Type property:

  • Field Name: Specifies the field from the external print system that replaces the sample data for the data source.

  • Sample Data: Specifies the data that is displayed on the template if BarTender cannot connect to the external print system. To add a symbol or special character to the Sample Data field, click to open the Insert Symbols or Special Characters dialog.

ClosedLink to an Existing Named Data Source

The Link to Existing Named Data Source option is available in the Change Data Source Type wizard only when one or more named data sources are created for the document.

When Link to an Existing Named Data Source is selected for the Type property, the available properties are determined by the named data source's own data source. For example, if you selected a named data source that was configured to have a Database Field data source, then the available properties for the selected object's data source are the properties that are associated with a Database Field data source.

You can use named data sources to attach a single data source, such as a database field, to multiple objects. Any change that is made to a named data source results in the same change being made to all other objects in the document where the named data source is used. For more information about named data sources, refer to Creating Named Data Sources.

ClosedTable Data Field

The Table Data Field option is available in the Change Data Source Type wizard only after you add a table object to the template and specify a source of data for the table by using the table object's Table Data property page.

The following properties are available when Table Data Field is selected for the Type property:

  • Object Name: Specifies the name of the table whose table source is defined.

  • Field Name: Specifies the field that is defined by the table source.

  • Calculate sum or other aggregate function: Specifies that you want to evaluate the table source field with a sum or aggregate function in order to determine the value that you want to be displayed. Available when the object is placed in a row with a table data template that is not Data.

    • Function: Specifies the sum or other aggregate function that you want to use for the Table Data Field data source.

    • Range: Specifies the range of records to use for the specified function.

  • Sample Data: Specifies the text that is displayed by the object in the design view. When the table is printed, this value is replaced by the source data or by the value that is determined by the function that is applied to the source data when you specified a function.

For more information about the types of functions that are supported for the Table Data Field data sources, refer to Using Table Data Field Functions.

ClosedData Type Tab

Use the Data Type tab to specify the data type for the selected data source. When you select a specific data type for the data source, you prevent BarTender from interpreting certain data inputs, such as numerical values, dates, or binary data, as text. By changing the data type of a value, you can perform mathematical functions on numerical values, format and display scientific notation, automatically display numbers as percentages, format and serialize roman numerals, perform functions on date objects, or display the time and date in a different language's format without changing the language of the application.

The Data Type tab is not available on the property page when you open the property page to configure a Global Data Field data source.

The following options are available:

The remaining properties that you can configure for the data type depend on the data type that is specified by the Type property.

ClosedText

The Text data type formats the data source value as one or more lines of text, including letters, numbers, and/or special characters. This is the default data type for all text objects in BarTender.

There are no additional properties to configure for a Text data type.

ClosedDate

The Date data type formats the data source value as a date that consists of one or more of the following attributes: a day of the week, a day of the month, a month, a year, and/or a time.

You can configure the following properties for a Date data type:

  • Locale: Specifies the language and country of the selected date format. In addition to all locales that are supported by Windows, the following options are available:

    • Use Windows Default: Sets the locale to the user's current Windows Regional and Languages setting. When you use this setting, the date is formatted differently depending on the system’s current language. If you do not want the potential for different formatting between different systems, select a specific locale setting.

    • Language Independent (Generic): Lists formats that are the same in every language. This includes several numeric formats for year, month, day, and time.

    • Language Independent (ISO 8601): Lists formats according to the ISO 8601 specification. These formats are language-independent.

  • Calendar: Specifies the calendar to use for locales that contain multiple calendars.

  • Format: Lists the date and date-and-time formatting options that are available for the specified Locale. You can use the Custom option to specify a user-defined date format that uses Custom Date and Time Format Strings.

  • Pattern: Displays the selected date or date-and-time format. When Custom is selected, you can use this option to enter a user-defined format. For more information about available custom strings, refer to Custom Date and Time Format Strings.

  • Time Zone: Specifies whether the date is displayed in the local time zone or Coordinated Universal Time (UTC). UTC time, or Greenwich Mean Time, is an international time scale that is based on the local standard time on the 0 longitude meridian in Greenwich, England.

ClosedTime

The Time data type formats the data source value as a time that consists of one or more of the following attributes: hours, minutes, seconds, and/or fractions of seconds.

You can configure the following properties for a Time data type:

  • Locale: Specifies the language and country of the selected time format. In addition to all locales that are supported by Windows, the following options are available:

    • Use Windows Default: Sets the locale to the user's current Windows Regional and Languages setting. When you use this setting, the timeis formatted differently depending on the system’s current language. If you do not want the potential for different formatting between different systems, select a specific locale setting.

    • Language Independent (Generic): Lists formats that are the same in every language. This includes several numeric formats for hour, minute, and second.

    • Language Independent (ISO 8601): Lists formats according to the ISO 8601 specification. These formats are language-independent.

  • Format: Lists the time formatting options that are available for the specified Locale. You can use the Custom option to specify a user-defined time format that uses Custom Date and Time Format Strings.

  • Pattern: Displays the selected time format. When Custom is selected, you can use this option to enter a user-defined format. For more information about available custom strings, refer to Custom Date and Time Format Strings.

  • Time Zone: Specifies whether the time is displayed in the local time zone or Coordinated Universal Time (UTC). UTC time, or Greenwich Mean Time, is an international time scale that is based on the local standard time on the 0 longitude meridian in Greenwich, England.

ClosedNumber

The Number data type formats numerical data according to a specific locale and/or notation.

You can configure the following properties for a Number data type:

  • Locale: Specifies the language and country of the selected numerical format. In addition to all locales that are supported by Windows, the following options are available:

    • Hexadecimal: Converts the specified number to hexadecimal (for example, the decimal number 1234 is converted to 04D2).

      • Use lowercase letters: Displays the letters in hexadecimal numbers in lowercase format.

      • Minimum length: Specifies the minimum number of digits for the hexadecimal number. Any extra digits are represented with leading zeroes.

    • Roman Numerals: Displays the number as roman numerals (for example, the number 1234 is displayed as MCCXXXIV). The supported range is from 0 to 3999, with zero displayed as "N".

      • Use lowercase letters: Displays roman numerals in lowercase format.

    • Scientific Notation: Displays the number in scientific notation (for example, the number 1234 is displayed as 1.234E+003).

      • Use lowercase letters: Displays the letters in scientific notation numbers in lowercase format.

  • Use native numerals: Specifies whether to use Arabic numerals or the native numeric system when you use a locale that supports alternative numeric systems. Available for the following locales: Arabic (Bahrain, Egypt, Iraq, Jordan, Kuwait, Lebanon, Oman, Qatar, Saudi Arabia, Syria, U.A.E., Yemen), Assamese (India), Bengali (Bangladesh, India), Dari (Afghanistan), Gujarati (India), Kannada (India), Khmer (Cambodia), Konkani (India), Lao (Lao P.D.R.), Malayalam (India), Marathi (India), Nepali (Nepal), Oriya (India), Pashto (Afghanistan), Persian (Iran), Punjabi (India), Sanskrit (India), Telugu (India), Thai (Thailand), and Urdu (Islamic Republic of Pakistan).

  • Use digit grouping separator: Separates the number into groups by using a delimiter; this delimiter is also known as the thousands separator because it separates the number at every third digit, which is the thousands place.

  • Show leading zero: Displays a zero before a decimal number.

  • Precision: Specifies a fixed number of digits to follow the decimal mark. Alternatively, you can limit the precision to a maximum number of digits that is specified by this option.

  • Negative numbers: Specifies the formatting of any negative numbers that the data source contains.

ClosedCurrency

The Currency data type formats your text as a numerical input of a monetary amount.

You can configure the following properties for a Currency data type:

  • Locale: Specifies the language and country of the selected currency format.

  • Use native numerals: Specifies whether to use Arabic numerals or the native numeric system when you use a locale that supports alternative numeric systems. Available for the following locales: Arabic (Bahrain, Egypt, Iraq, Jordan, Kuwait, Lebanon, Oman, Qatar, Saudi Arabia, Syria, U.A.E., Yemen), Assamese (India), Bengali (Bangladesh, India), Dari (Afghanistan), Gujarati (India), Kannada (India), Khmer (Cambodia), Konkani (India), Lao (Lao P.D.R.), Malayalam (India), Marathi (India), Nepali (Nepal), Oriya (India), Pashto (Afghanistan), Persian (Iran), Punjabi (India), Sanskrit (India), Telugu (India), Thai (Thailand), and Urdu (Islamic Republic of Pakistan).

  • Use digit grouping separator: Separates the number into groups by using a delimiter; this delimiter is also known as the thousands separator because it separates the number at every third digit, which is the thousands place.

  • Show leading zero: Displays a zero before a decimal number.

  • Decimal places: Specifies the number of decimal places to include in the number.

  • Positive currency: Specifies the formatting of a positive currency value.

  • Negative currency: Specifies the formatting of a negative currency value.

ClosedPercentage

The Percentage data type formats the data source value as a number and a percent sign (%), and it represents portions of a greater whole.

You can configure the following properties for a Percentage data type:

  • Locale: Specifies the language and country of the selected numerical format.

  • Use native numerals: Specifies whether to use Arabic numerals or the native numeric system when you use a locale that supports alternative numeric systems. Available for the following locales: Arabic (Bahrain, Egypt, Iraq, Jordan, Kuwait, Lebanon, Oman, Qatar, Saudi Arabia, Syria, U.A.E., Yemen), Assamese (India), Bengali (Bangladesh, India), Dari (Afghanistan), Gujarati (India), Kannada (India), Khmer (Cambodia), Konkani (India), Lao (Lao P.D.R.), Malayalam (India), Marathi (India), Nepali (Nepal), Oriya (India), Pashto (Afghanistan), Persian (Iran), Punjabi (India), Sanskrit (India), Telugu (India), Thai (Thailand), and Urdu (Islamic Republic of Pakistan).

  • Use digit grouping separator: Separates the number into groups by using a delimiter; this delimiter is also known as the thousands separator because it separates the number at every third digit, which is the thousands place.

  • Show leading zeroes: Displays one or more zero numerals before a decimal number.

  • Pad with zeroes to maximum number of decimal places: Adds one or more zero numerals to a number that does not match the specified number of decimal places.

  • Decimal places: Specifies the number of decimal places to include in the number.

  • Positive percentage: Specifies the formatting of a positive percentage value.

  • Negative percentage: Specifies the formatting of a negative percentage value.

ClosedFraction

The Fraction data type formats the data source value as a numerical fraction, complete with a numerator and a denominator.

You can configure the following properties for a Fraction data type:

  • Locale: Specifies the language and country of the selected numerical format.

  • Use native numerals: Specifies whether to use Arabic numerals or the native numeric system when you use a locale that supports alternative numeric systems. Available for the following locales: Arabic (Bahrain, Egypt, Iraq, Jordan, Kuwait, Lebanon, Oman, Qatar, Saudi Arabia, Syria, U.A.E., Yemen), Assamese (India), Bengali (Bangladesh, India), Dari (Afghanistan), Gujarati (India), Kannada (India), Khmer (Cambodia), Konkani (India), Lao (Lao P.D.R.), Malayalam (India), Marathi (India), Nepali (Nepal), Oriya (India), Pashto (Afghanistan), Persian (Iran), Punjabi (India), Sanskrit (India), Telugu (India), Thai (Thailand), and Urdu (Islamic Republic of Pakistan).

  • Use composite fraction symbols: Formats fractions as a single character (for example, ½). Otherwise, fractions are displayed as a group of separate characters (for example, 1/2).

  • Precision: Specifies the degree to which BarTender rounds a complex fraction. For example, if you select As quarters, the fraction is rounded to the nearest 1/4, and if you select Up to 3 digits, the fraction is rounded to the nearest 1/999.

  • Improper fractions: Specifies how to format improper fractions. An improper fraction contains a higher numerator (upper number) than denominator (lower number) (for example, 4/3). Alternatively, these fractions can be formatted as mixed fractions, which are a combination of an integer and a regular fraction (for example, 1 1/3).

ClosedBinary

The Binary data type instructs BarTender to convert the data source to a binary string of ones and zeroes. If the data source is a database field, the input can be translated based on the translation method that is selected in the Convert To Binary dialog. The binary data type is available for binary large object (BLOB) database fields, object values, external files, and embedded data.

There are no additional properties to configure for a Binary data type.

ClosedPicture

The Picture data type converts an image into binary data.

You can configure the following properties for a Picture data type:

  • Format: Specifies the file type of the image.

  • Colors: Specifies the color range that is available for the image.

  • Dithering: Specifies the dithering method for the image. Dithering mixes different primary colored dots to produce secondary colors. Not available for JPEG, JPEG 2000, or JPEG XR formats.

  • Quality: Specifies the quality with which the image is saved. Available only for JPEG, JPEG 2000, or JPEG XR formats.

  • Sizing Method: Specifies whether a picture can be resized on the template and, if so, what method is used to resize it. Available options include the following:

    • Fit to Rectangle: Sizes a picture by forcing it into a specific rectangular area. You can use your mouse to adjust a picture's size or enter an exact measurement by using the following options:

      • Width: Specifies the width of the rectangle.

      • Height: Specifies the height of the rectangle.

      • Fit: Specifies how the picture is aligned within the rectangle.

        • Entire Picture: Fits the image into the rectangle while maintaining the original aspect ratio.

        • Width: Fits the image so that the width of the image matches the width of the rectangle. This might result in vertical clipping of your image.

        • Height: Fits the image so that the height of the image matches the height of the rectangle. This may result in horizontal clipping of your image.

    • Stretch to Rectangle: Stretches the image to fill a given rectangle, regardless of aspect ratio.

      • Width: Specifies the width of the rectangle.

      • Height: Specifies the height of the rectangle.

    • Percentage of Original Size: Specifies the size of the printed image by the selected percentage of the image's original size.

ClosedTransforms Tab

Use the Transforms tab to configure additional options that modify (or "transform") a data source, such as serialization and truncation. To configure these options, click the icon next to the option that you want. The selection of available transforms varies depending on the selected data type and includes one or more of the following:

Using the Data Sources Toolbar

Use the data sources toolbar to easily create a new data source, delete or copy an existing data source, or change the order of existing data sources for the selected object. The toolbar is located below the left navigation pane of the Object Properties dialog when either the Data Sources node or an existing data source is selected in the navigation pane.

The data sources toolbar includes the following options:

Starts the New Data Source wizard, which you can use to create a new data source for the selected object.

Provides access to the GS1 Data Source wizard, which you can use to insert a data source that conforms to GS1 specifications.

Removes the selected data source.

Removes the selected data source and places a copy on the Clipboard.

Copies the selected data source to the Clipboard.

Creates a new data source for the selected object that is a copy of the data source that is currently on the Clipboard.

Moves the selected data source up one position in the navigation pane.

Moves the selected data source down one position in the navigation pane.

The order in which an object's data sources are listed in the navigation pane determines the order in which they are concatenated.

Related Topics