Databases can be used as a dynamic data source for label or form objects. To make the database content accessible and retrievable from the selected object, the database connection must be properly established and configured.

The most time efficient and user friendly way of adding a database to your label or solution data sources is to use the Step-by-Step Database Wizard.

Desktop Designer also allows the database connections to be established and configured manually. This way, the entire range of connection settings becomes configurable. It is recommended that only experienced users choose this option.

All label or solution databases are listed in the Dynamic Data Explorer.

Desktop Designer supports a wide selection of database types. The supported database types are listed here.

Read about how to connect to the supported database types here.

Read about other available object data sources and how to use the Dynamic Data Manager here.

Supported Database Types

Desktop Designer supports multiple types of databases:

NiceLabel recommends using standard database types such as Text, Excel, Access, SQL Server, and MariaDB / MySQL. The use of standard database types is easier and more time efficient due to optimized application performance and user interface. When working with a non-standard database type, use the OLE and ODBC options.

Read about how to connect to the supported database types here.

Database Connection Options

Desktop Designer offers two ways for connecting an object to a database. The diagram below shows the two available options.

UUID-c2007772-2ffe-2ae9-0604-186af8cfdfc2.png
  1. Step-by-step Database Wizard offers a guided process for:

    • connecting a database to a label or form object

    • adding a database to the labeling solution's data sources

    The process of establishing and configuring a wizard based database connection is described here.

  2. Manually established and configured database connection.

Note

This option is intended for advanced users. It allows detailed configuration and offers all of the available database connection settings.

The process of establishing and configuring a database connection manually is described here.

Step-by-Step Database Wizard

Database wizard is a guided process that allows the user to configure a connection to a database and to select which tables and fields will be used.

UUID-514f3d09-839c-4f92-aaaf-c6e0857e6b54.png

Edit Database allows you to edit all existing connected databases using a wizard.

The wizard additionally allows you to sort, filter records, and to define how many label copies will be printed per database record.

Adding a Database

To add a database using the Database Wizard, click the preferred database button in Desktop Designer Data tab ribbon > Step-by-step Database Wizard group.

There are three ways to start the Database Wizard:

  • Option 1: Click the preferred database button in Desktop Designer Data tab ribbon > Step-by-step Database Wizard group.

UUID-07338bd7-b2b8-1173-5fc3-c1ae60d78cae.png
  • Option 2: Click the preferred database button in Dynamic Data Manager > Step-by-Step Database wizard ribbon group.

UUID-514f3d09-839c-4f92-aaaf-c6e0857e6b54.png
UUID-63711b79-ce43-05f1-6330-cfbe531ad8c3.png

Listed below are the available wizard options. To successfully add a database, follow the steps for each database type:

Database Wizard for Excel Files

This section describes how to connect Excel database to an object using the Desktop Designer Step-by-Step Database Wizard.

Step 1: Connection Settings

Step 2: Tables and Fields

This step defines which database table and which fields of this table should be used as a dynamic data source.

Click Next.

Step 3: Label Copies Per Record

Step 4: Create Objects

Step 5: Data Preview and Other Table Settings

Click Finish. The database is ready to be used as label or form object data source.

Database Wizard for Access Database

This section describes how to connect your Access database to an object using the Desktop Designer Step-by-Step Database Wizard.

Step 1: Connection Settings

This step defines the Access database file connection details.

File name selects the database file.

Authentication requires User name and Password for password protected Access database files.

Test Connection button starts a connection testing procedure. It checks if Desktop Designer can successfully connect to the database.

Click Next.

Step 2: Tables and Fields

Step 3: Label Copies Per Record

Step 4: Create Objects

Step 5: Data Preview and Other Table Settings

Click Finish. The database is ready to be used as a label or form object data source.

Database Wizard for Microsoft SQL Server Database

This section describes how to connect a Microsoft SQL Server database to a form or label object using the Desktop Designer Step-by-Step Database Wizard.

Step 1: Connection Settings

This step defines the database file connection details.

Connection Information group defines which server hosts the database you are connecting to.

  • Server selects the database server.

Authentication group defines the user authentication type for your database server.

  • Use Windows authentication. This option defines the Windows authentication as a verification method for connecting to an SQL server. The user connects to a database using the domain user name and password.

  • Use SQL Server authentication. This option defines the database user name and password as the verification method. To establish a connection, enter the user name and password provided by the database administrator.

Show Connection String displays the current database connection string and allows it to be inserted or modified.

Warning

Connection string editing is intended for advanced users only. To configure the database connection, users are encouraged to use standard inputs in the dialog box.

Database Selection group selects the database on the connected server.

Test Connection button starts a connection testing procedure. It checks if Desktop Designer can successfully connect to the database.

Click Next to proceed.

Step 2: Tables and Fields

Step 3: Label Copies Per Record

Step 4: Create Objects

Step 5: Data Preview and Other Table Settings

Click Finish. The database is ready to be used as your label or form object data source.

Database Wizard for Text Files

This section describes how to use a text file as your data source in your label or form objects. A text file is connected to an object using the Desktop Designer Step-by-Step Database Wizard.

Step 1: Text File Structure Wizard

Step 2: Connection Settings

This step defines the text file path.

File name defines the location of the Text file to be used. Enter the location manually or click Browse to locate it in the system.

Test Connection button starts a connection testing procedure. It checks if Desktop Designer can successfully connect to the database.

Click Next.

Step 3: Tables and Fields

Note

Table selection is not available when adding a text file as a database. The entire text file is treated as a single database table.

Step 4: Label Copies Per Record

Step 5: Create Objects

Step 6: Data Preview and Other Table Settings

This step gives a preview of the data retrieved from the database. It also offers additional table settings such as filtering and sorting.

Data tab displays a preview of data retrieved from the database file. You can use search controls at the top of the preview section to find a specific record.

Note

Data preview shows up to 1000 rows.

Fields tab displays available and selected database fields. The settings configured in "Label Copies Per Record" can be redone on this tab.

Data Retrieving tab defines how the data should be retrieved from the connected database file. Read more about data retrieving here.

Click Finish. The database is ready to be used as your label or form object data source.

Database Wizard for Oracle Database

This section describes how to add an Oracle database to a form or label object using the Desktop Designer Step-by-Step Database Wizard.

Step 1: Connection Settings

This step defines the database connection details.

Note

Oracle Database Provider is required to establishing a connection with Oracle database.

Data Source defines the Oracle Data Source name.

Authentication provides a user name and password for establishing the connection.

Advanced Setup button opens the Data Link Properties window allowing the user to define the connection properties. Data Link Properties is a Windows system dialog – read more about its properties here.

Test Connection button starts a connection testing procedure. It checks if Desktop Designer can successfully connect to the database.

Step 2: Tables and Fields

Step 3: Label Copies Per Record

Step 4: Create Objects

Step 5: Data Preview and Other Table Settings

Click Finish. The database is ready to be used as a label or form object data source.

Database Wizard for MariaDB / MySQL Database

This section describes how to add a MariaDB / MySQL database to a form or label object using the Desktop Designer Step-by-Step Database Wizard.

Important

Don't update your database connection for your label templates already connected to MySQL. In this case, continue using the MySQL software. Your label templates work the same as before.

Step 1: Connection Settings

This step defines the MariaDB / MySQL database connection details.

  • Database: defines the exact database on a server.

  • Host: defines the database address.

  • Port: defines the port of the database server.

  • Authentication: provides user name and password for establishing the connection.

Test Connection button starts a connection testing procedure. It checks if Desktop Designer can successfully connect to the database.

Step 2: Tables and Fields

Step 3: Label Copies Per Record

Step 4: Create Objects

Step 5: Data Preview and Other Table Settings

Click Finish. The database is ready to be used as a label or form object data source.

Database Wizard for Adding Databases via OLE DB

This section describes how to add various types of databases via OLE DB source to a form or label object using the Desktop Designer Step-by-Step Database Wizard.

The OLE DB extracts data from a variety of OLE DB-compliant relational databases by using a database table, a view, or an SQL command.

Example:

OLE DB can extract data from tables in Microsoft Access or SQL Server databases.

Step 1: Connection Settings

This step defines the OLE DB connection details.

Provider defines the provider to be used for accessing the data by exposing the OLE DB interfaces.

Authentication provides the user name and password for establishing the connection.

Test Connection button starts a connection testing procedure. It checks if Desktop Designer can successfully connect to the database.

Authentication provides the user name and password that are used for the connection.

Advanced Configuration options are:

  • Automatically browse for tables automatically displays the available OLE database tables. If this checkbox is cleared, you will have to enter the table name manually.

Advanced Setup button opens the Data Link Properties window allowing the user to define the connection properties. Data Link Properties is a Windows system dialog – read more about its properties here.

Note

When connecting to a password protected database, make sure the Allow saving password option is selected. If not, even after a successful Test Connection procedure, database access is not going to be granted.

UUID-54f9087e-99a1-2ef5-8fda-b63e250825b1.png

Test Connection button starts a connection testing procedure to confirm if a connection with your database has been established successfully. A confirmation or error message appears.

Click Next.

Step 2: Tables and Fields

Step 3: Label Copies Per Record

Step 4: Create Objects

Step 5: Data Preview and Other Table Settings

Click Finish. The database is ready to be used as a label or form object data source.

Database Wizard for ODBC Data Sources

This section describes how to work with Desktop Designer Step-by-Step Database Wizard when adding an ODBC data source.

The Microsoft® ODBC Data Source Administrator manages database drivers and data sources. This application is located in the Windows Control Panel under Administrative Tools.

For information about detailed ODBC Administrator procedures, open the ODBC Data Source Administrator dialog box and click Help.

Step 1: Connection information

This step defines the database connection details.

Connection Information group defines the type of database that is going to be used with ODBC connection.

  • Data Source: defines the database to retrieve the data from. Databases that are listed in the dropdown list are managed using the ODBC Administrator.

  • Driver: displays the database driver according to the selected data source.

Authentication group includes a user name and password fields for the ODBC connection. User authentication is necessary in certain cases – e.g., if SQL authentication is required when connecting to an SQL server.

  • User name: enter the correct user name to access the ODBC database.

  • Password: enter the correct password to access the ODBC database.

Note

Username and password are always shown. Their use depends on the database administration policy.

ODBC Administrator button opens the system ODBC administration dialog. See more details about the dialog here.

Test Connection button starts a connection testing procedure. It checks if Desktop Designer can successfully connect to the database.

Step 2: Tables and Fields

Step 3: Label Copies Per Record

Step 4: Create Objects

Step 5: Data Preview and Other Table Settings

Click Finish. The database is ready to be used as a label or form object data source.

Database Wizard for Google Sheets

This section describes how to connect Google Sheets tables using the Desktop Designer Step-by-Step Database Wizard.

Note

Connecting to Google Sheets requires Google authentication. Printing from NiceLabel Automation, .NET API or Cloud Integrations is not possible.

  1. In the Data menu, click All Databases to open Step-by-Step Database Wizard, then click Next.

    16_excel_wizard_new1.png
  2. Database Type Selection window opens. Select Google Sheets, then click Next.

    17_google_wizard_new_2.png
  3. Connection Settings window opens. Click Sign in.

    17_google_wizard_new_3.png
  4. Your web browser opens with Sign in with Google options.

    02_Sign_in.png

    Click your account to log in.

  5. A new window with options to access your Google Account opens. Select both options:

    • See information about your Google Drive files.

    • See all your Google Sheets spreadsheets.

    Then click Continue.

    03_enable_options.png
  6. Confirmation messages about successful connections appear in your browser and Desktop Designer. Close the confirmation window in Desktop Designer.

    04_connection_successful_browser.png
    05_connection_successful_Designer.png
  7. In the Connection Settings window select your Google Spreadsheet, then click Next.

    17_google_wizard_new_5.png

    In the Spreadsheet list, you can also see sheets that are shared with your account. You can use the shared sheets the same way as your own.

    Important

    If you share your label with other clients, enable sharing of your Google Sheets so other clients can log in with their credentials.

    NiceLabel will prompt other clients for Google login when opening labels/solutions.

    Test Connection button starts a connection testing procedure. It shows if a connection with the selected Google spreadsheet has been established successfully. A confirmation or error message appears depending on the connection status.

  8. Your spreadsheet fields are now connected to your solution. You can remove the fields you don't need. Then click Finish.

    12_eizard_add_remove_fields.png
  9. Finish your database wizard with the remaining wizard steps:

    • Label Copies per Record

    • Create Objects

    • Date Preview and Other Table Settings

Your Google sheet is now connected to your label/solution.

Warning

Google login expires after 90 days. After login expires, Desktop Designer will prompt you to sign in with your Google account.

Database Wizard for Excel (Microsoft OneDrive)

This section describes how to connect Excel (Microsoft OneDrive) spreadsheets stored in Microsoft OneDrive using the Desktop Designer Step-by-Step Database Wizard.

Note

Connecting to Excel (Microsoft OneDrive) spreadsheets requires Microsoft authentication. Printing from NiceLabel Automation, .NET API or Cloud Integrations is not possible.

  1. In the Data menu, click All Databases to open Step-by-Step Database Wizard, then click Next.

    16_excel_wizard_new1.png
  2. Database Type Selection window opens. Select Excel (Microsoft OneDrive), then click Next.

    16_excel_wizard_new2.png
  3. Connection Settings window opens. Click Sign in with Microsoft.

    16_excel_wizard_new3.png
  4. Your web browser opens with Microsoft account options.

    22_account.png

    Pick your account that will connect to your Microsoft OneDrive.

    Note

    Some companies have restricted access to corporate OneDrive accounts. In this case, you'll have to get the administrator's permission to connect to Excel with your account. The following window opens:

    29_admin_approval.png

    If the security risk is too high, you can use or create a personal Microsoft account and use OneDrive from that account.

  5. Allow NiceLabel Desktop Designer to access your OneDrive data.

    23_allow.png
  6. Confirmation messages about successful connections appear in your browser and Desktop Designer. Close the confirmation window in Desktop Designer.

    24_successful1.png
    25_successful2.png
  7. In the Connection Settings window select your Excel spreadsheet, then click Next.

    16_excel_wizard_new5.png

    Important

    If you share your label or solution with other clients, enable sharing of your Excel spreadsheet in OneDrive so other clients can log in with their credentials.

    There are two types of Microsoft accounts: personal accounts and work/school accounts. You can share only Spreadsheets from the same type of account. You can share spreadsheets from one personal account to another. You can share spreadsheets from one work/school account to another, but only within the same organization (or joined organizations). You can't share a spreadsheet between personal and school/work accounts or between work/school accounts from different organizations.

    NiceLabel will prompt other clients for Microsoft login when opening labels/solutions.

    In the current Desktop Designer:

    • You can create a new label or solution only with your own Excel (Microsoft OneDrive) files.

    • You can't create a new label or solution connected to shared Excel (Microsoft OneDrive) files.

    • You can open and print existing labels or solutions connected to shared Excel (Microsoft OneDrive) files.

    Note

    Microsoft doesn't support .xls files in Excel OneDrive edition.

    Test Connection button starts a connection testing procedure. It shows if a connection with the selected Google spreadsheet has been established successfully. A confirmation or error message appears depending on the connection status.

  8. Your spreadsheet fields are now connected to your solution. You can remove the fields you don't need. Then click Finish.

    33_wiz_table_2.png
  9. Finish your database wizard with the remaining wizard steps:

    • Label Copies per Record

    • Create Objects

    • Date Preview and Other Table Settings

Your Excel sheet is now connected to your label/solution.

Warning

Microsoft login expires after 90 days. After login expires, Desktop Designer will prompt you to sign in with your Microsoft account.

Database Editing

Edit Database button re-starts the Step-by-Step Database Wizard for configuring an existing database.

To properly reconfigure a database that has already been added, follow the below-listed steps.

Step 1: Define Database Table

Use this step to select among the existing databases. Select the database and the table you wish to edit. Click Next to proceed.

Step 2: Connection Settings

Step 3: Tables and Fields

Step 4: Label Copies Per Record

Step 5: Create Objects

Step 6: Data Preview and Other Table Settings

Click Finish.

Manual Database Connection Setup

Setting up a database connection manually gives you complete control over database connection settings and configuration options.

Note

This option is intended for advanced users. It allows detailed configuration and offers all of the available database connection settings. NiceLabel recommends using the Database Wizard.

Manual database connections are done in three steps:

  1. First step sets up the database connection.

  2. Second step allows you to choose which database tables will be used.

  3. Third step allows you to configure the connected database tables.

To connect to a database manually, follow the procedures described in the below-listed topics:

Connect to Microsoft Excel File

Microsoft Excel databases can be used as a dynamic data source for label objects or form objects. Before you manually set up a database connection, open the Dynamic Data Manager. This dialog enables the user to manage the variable data sources for label and form objects.

Click Database Connections button in the Dynamic Data Manager ribbon and select Microsoft Excel as the preferred database type. New database connection properties window opens.

To manually connect to an Excel file database, complete the below-listed steps.

Step 1: Connection Setup

Connection type group allows you to define the type of database connection.

Connection Information group defines database file details.

  • File name: defines the database file to be used in the connection.

  • Advanced Setup: opens the Data Link Properties window. This window allows you to define the connection properties. Data Link Properties is a Windows system dialog – read more about its properties here.

  • Test Connection: button starts a connection testing procedure. It shows if a connection with the database has been established successfully. A confirmation or error message appears depending on the connection status.

UUID-9c1b5442-beb8-e28d-93bf-45afe0972cff.png

Click OK when done. Database properties window appears.

UUID-5aaf2a99-ff43-3c29-83de-42aea90a196e.png

Step 2: Database Table Selection

Click OK when done.

Step 3: Configuration of Database Tables and Fields

Read about how to configure the connected table here.

Read about how to configure the database fields here.

Click OK when done.

Connect to Microsoft Access File

Microsoft Access databases can be used as a dynamic data source for label objects or form objects. Before you manually set up a database connection, open the Dynamic Data Manager. This dialog enables the user to manage the variable data sources for label and form objects.

Click your Database Connections button in the Dynamic Data Manager ribbon and select Microsoft Access as the preferred database type. New database connection properties window opens.

To manually connect an object to an Access file database, complete the below-listed steps.

Step 1: Connection Setup

Connection type group allows you to define the type of database connection.

Connection Information window defines database file details.

  • File name: defines the database file to be used in the connection.

Authentication group provides the User name and Password for connecting to a protected file.

  • Advanced Setup: opens the Data Link Properties window. This window allows you to define the connection properties. Data Link Properties is a Windows system dialog – read more about its properties here.

  • Test Connection: starts a connection testing procedure. It shows if a connection with the database has been established successfully. A confirmation or error message appears depending on the connection status.

UUID-0b61b3ca-61f7-443a-7ae3-bc12ac1d9a20.png

Click OK when done. Database properties window appears.

UUID-5aaf2a99-ff43-3c29-83de-42aea90a196e.png

Step 2: Database Table Selection

Click OK when done.

Step 3: Configuration of Database Table and Fields

Read about how to configure the connected table here.

Read about how to configure the database fields here.

Click OK when done.

Connect to Microsoft SQL Server Database

Microsoft SQL Server database can be used as a dynamic data source for label objects or form objects. Before you manually set up a database connection, open the Dynamic Data Manager. This dialog enables the user to manage the variable data sources for label and form objects.

Click Database Connections button in the Dynamic Data Manager ribbon and select Microsoft SQL Server as the preferred database type. New database connection properties window opens.

To manually connect an object to a Microsoft SQL Server database, complete the following steps:

Step 1: Connection Setup

Connection type group allows you to define the type of database connection.

Connection Information group defines database details.

  • Server: defines the database server to be used for the connection. The available servers are listed automatically. To add a non-listed server, insert its name or location manually.

  • Authentication: selects the user authentication type.

    • Use Windows authentication to login using your Windows domain credential.

    • Use SQL Server authentication to login using the SQL server credentials.

Database selection group selects the database on the previously selected server. This database is going to be used as a data source for the selected label or form object.

  • Database: defines the server database to connect to.

Show Connection String displays the current database connection string and allows it to be inserted or modified.

Warning

Connection string editing is intended for advanced users only. To configure the database connection, users are encouraged to use standard dialog inputs in the dialog box.

Test Connection button starts a connection testing procedure. It shows if your connection with the database has been established successfully. A confirmation or error message appears depending on the connection status.

UUID-1cd1d6ae-aff5-3e07-9b4d-b18e69fee7fd.png

Click OK when done.

UUID-5aaf2a99-ff43-3c29-83de-42aea90a196e.png

Step 2: Database Table Selection

Click OK when done.

Step 3: Configuration of Database Tables and Fields

Read about how to configure the connected table here.

Read about how to configure the database fields here.

Click OK when done.

Connect to Text File

Text File database can be used as a dynamic data source for label objects or form objects.

Text files require some additional work before they are transformed into a "real" database. At the start, any text file contains data values but has no information about the data structure, name fields, and maximum field lengths. These missing parameters need to be specified before the text file turns into a database that can be used as an object data source.

Example 52. Example:

A widely used text database example are .csv files. In a .csv file, a delimiter separates the database fields. Each line provides the data for a single label – therefore, it can be understood as a "record" in database nomenclature.


Open the Dynamic Data Manager. This dialog enables the user to manage the variable data sources for label and form objects.

Click Database Connections button in the Dynamic Data Manager ribbon and select Text File as the preferred database type.

To manually connect an object to a text file database, complete the below-listed steps.

Step 1: Connection Setup

Connection Information window defines the database file details.

  • File name defines the file location.

  • Test Connection: starts a connection testing procedure. It shows whether or not a connection with the database has been established. A confirmation or error message appears depending on the connection status.

UUID-a89330eb-fb3f-17dd-d612-3559a4b1bb03.png

Click OK when done. Database properties window appears.

UUID-e3a4b811-72ff-439e-45c0-189c12a471c4.png

Step 1a: Text File Structure Wizard

Step 2: Configuration of Database Tables and Fields

Read about how to configure the connected table here.

Read about how to configure the database fields here.

Click OK when done.

Connect to Oracle Database

Oracle database can be used as a dynamic data source for label objects or form objects.

Open the Dynamic Data Manager. This dialog enables the user to manage the variable data sources for label and form objects.

Click your Database Connections button in the Dynamic Data Manager ribbon and select Oracle as the preferred database type. New database connection properties window opens.

Note

To connect to Oracle database and use the data in NiceLabel software, you must first install and configure the Oracle client software on each computer with installed NiceLabel 10. Details are available in the knowledge base article.

Step 1: Connection Setup

Connection type group allows you to define the type of database connection.

Connection Information group defines database file details.

  • Server: defines the database server to be used for the connection. The available servers are listed automatically. To add a non-listed server, insert its name or location manually.

Authentication group selects user authentication type.

  • Use Windows authentication: login using your Windows domain credential.

  • Use SQL Server authentication: login using SQL server credentials.

Database selection selects the database on the previously selected server. This database is going to be used as a data source for the selected label or form object.

  • Database defines the server database to connect to.

Show Connection String displays the current database connection string and allows it to be inserted or modified.

Warning

Connection string editing is intended for advanced users only. To configure the database connection, users are encouraged to use standard dialog inputs in the dialog box.

Test Connection button starts a connection testing procedure. It shows if your connection with the database has been established successfully. A confirmation or error message appears depending on the connection status.

UUID-a2b19ed3-2a09-7726-172e-08d254060e1a.png

Click OK when done. Database properties window appears.

UUID-5aaf2a99-ff43-3c29-83de-42aea90a196e.png

Step 2: Database Table Selection

Click OK when done.

Step 3: Configure connected database

Read about how to configure the connected table here.

Read about how to configure the database fields here.

Click OK when done.

Connect to MariaDB / MySQL Database

MariaDB / MySQL database can be used as a dynamic data source for label objects or form objects. Before you manually set up a database connection, open the Dynamic Data Manager. This dialog enables the user to manage the variable data sources for label and form objects.

Click Database Connections button in the Dynamic Data Manager ribbon and select MariaDB / MySQL as the preferred database type. New database connection properties window opens.

To manually connect an object to a MariaDB / MySQL database, complete the following steps:

Step 1: Connection Setup

Connection type group allows you to define the type of database connection.

Connection Information window defines the database file details.

  • Database: defines the exact database on a server. Enter the correct name.

  • Host: defines the database server IP address or name.

  • Port: defines the port of the database server.

Authentication group provides user name and password to establish the connection.

  • Test Connection button starts a connection testing procedure. It checks if Desktop Designer can successfully connect to the database.

UUID-34b17c73-352d-3940-68d4-70855e3bd27d.png

Click OK when done. Database properties window appears.

UUID-5aaf2a99-ff43-3c29-83de-42aea90a196e.png

Step 2: Database Table Selection

Click OK when done.

Step 3: Configuration of Database Tables and Fields

Read about how to configure the connected table here.

Read about how to configure the database fields here.

Click OK when done.

Connect to Other Databases (OLE DB)

Various types of databases can be connected to label objects or form objects via the OLE DB source. Open the Dynamic Data Manager. This dialog enables the user to manage the variable data sources for label and form objects.

Clic your Database Connections button in the Dynamic Data Manager ribbon and select Other Databases (OLE DB) as the preferred database type. New database connection properties window opens.

OLE DB extracts data from a variety of OLE DB-compliant relational databases by using a database table, a view, or an SQL command.

Example 53. Example:

OLE DB can extract data from tables in Microsoft Access or SQL Server databases.


To manually connect an object to other databases via OLE DB, complete the below-listed steps:

Step 1: Connection Setup

Connection type group allows you to define the type of database connection.

Connection Information group defines database details.

  • Provider: defines the provider to be used for accessing the data by exposing the OLE DB interfaces.

Authentication provides the user name and password for establishing the connection.

Test Connection button starts a connection testing procedure. It checks if Desktop Designer can successfully connect to the database.

UUID-be467457-204d-9467-1606-d378b84c4912.png

Advanced Configuration options are:

  • Automatically browse for tables (selected by default) automatically displays the available OLE database tables. Cleared checkbox skips this step.

Advanced Setup button opens the Data Link Properties window allowing the user to define the connection properties. Data Link Properties is a Windows system dialog – read more about its properties here.

UUID-54f9087e-99a1-2ef5-8fda-b63e250825b1.png

Note

When connecting to a password-protected database, make sure the Allow saving password option is selected. If not, even after a successful Test Connection procedure, database access is not going to be granted.

Test Connection button starts a connection testing procedure to confirm if a connection with your database has been established successfully. A confirmation or error message appears.

Click OK. Database properties window appears.

UUID-5aaf2a99-ff43-3c29-83de-42aea90a196e.png

Step 2: Database Table Selection

Click OK when done.

Step 3: Configuration of Database Tables and Fields

Read about how to configure the connected table here.

Read about how to configure the database fields here.

Click OK when done.

Connect to ODBC Data Source

Various databases can be connected to label objects or form objects via ODBC Data Source Administrator. Open the Dynamic Data Manager. This dialog enables the user to manage the variable data sources for label and form objects.

Click Database Connections button in the Dynamic Data Manager ribbon and select ODBC Data Source as the preferred database type. New database connection properties window opens.

To manually connect an object to a database, using the ODBC, complete the following steps:

Step 1: Connection Setup

Connection Information group defines database details.

  • Data Source defines the source to retrieve the data from.

  • Driver displays the database driver according to the selected data source.

Authentication group includes a user name and password fields for the ODBC connection. User authentication is necessary in certain cases – e.g. if SQL authentication is required when connecting to an SQL server.

  • User name: enter the correct user name to access the ODBC database.

  • Password: enter the correct password to access the ODBC database.

ODBC Administrator button opens the system ODBC administration dialog. Read more details about the dialog here.

Test Connection button starts a connection testing procedure. It checks if Desktop Designer can successfully connect to the database.

UUID-a156f562-3b57-d422-bfc4-aa36df9deabc.png

Click OK. Database properties window appears.

UUID-5aaf2a99-ff43-3c29-83de-42aea90a196e.png

Step 2: Database Table Selection

Click OK when done.

Step 3: Configuration of Database Tables and Fields

Read about how to configure the connected table here.

Read about how to configure the database fields here.

Click OK when done.

Connect to Google Sheets

You can use Google Sheets as a dynamic data source for label objects or form objects. Before you manually set up a database connection, open Dynamic Data Manager. This dialog enables the label designer to manage the variable data sources for label and form objects.

Note

Connecting to Google Sheets requires Google authentication. Printing from NiceLabel Automation, .NET API or Cloud Integrations is not possible.

  1. Click the Database Connections button in the Dynamic Data Manager ribbon and select Google Sheets as your database type.

    14_google_new1.png
  2. New Database Connection Properties window opens. Click Sign in.

    14_google_new2.png
  3. Your web browser opens with Sign in with Google options.

    02_Sign_in.png

    Click your account to log in.

  4. A new window with options to access your Google Account opens. Select both options:

    • See information about your Google Drive files.

    • See all your Google Sheets spreadsheets.

    Then click Continue.

    03_enable_options.png
  5. Confirmation messages about successful connections appear in your browser and Desktop Designer. Close the confirmation window in Desktop Designer.

    04_connection_successful_browser.png
    05_connection_successful_Designer.png
  6. Select your Google Spreadsheet, then click OK.

    17_google_wizard_new_5.png

    In the Spreadsheet list, you can also see sheets that are shared with your account. You can use the shared sheets the same way as your own.

    Important

    If you share your label with other clients, enable sharing of your Google Sheets so other clients can log in with their credentials.

    NiceLabel will prompt other clients for Google login when opening labels/solutions.

    Test Connection button starts a connection testing procedure. It shows if a connection with the selected Google spreadsheet has been established successfully. A confirmation or error message appears depending on the connection status.

  7. Your Google spreadsheet is now connected. Add the table(s) you would like to use to the Selected tables.

    07_add_table.png
  8. Columns from your selected table(s) appear in the list of your Dynamic Data Sources. Click OK.

    08_coluns__finish.png

You can now connect data from your Google Sheets to your label objects.

Warning

Google login expires after 90 days. After login expires, Desktop Designer will prompt you to sign in with your Google account.

Connect to Excel (Microsoft OneDrive)

You can use Microsoft Excel spreadsheets stored in Microsoft OneDrive as a dynamic data source for label objects or form objects. Before you manually set up a database connection, open Dynamic Data Manager. This dialog enables the label designer to manage the variable data sources for label and form objects.

Note

Connecting to Excel (Microsoft OneDrive) spreadsheets requires Microsoft authentication. Printing from NiceLabel Automation, .NET API or Cloud Integrations is not possible.

  1. Click the Database Connections button in the Dynamic Data Manager ribbon and select Excel (Microsoft OneDrive) as your database type.

    15_excel_new_1.png
  2. New Database Connection Properties window opens. Click Sign in with Microsoft.

    15_excel_new_2.png
  3. Your web browser opens with Microsoft account options.

    22_account.png

    Pick your account that will connect to your Microsoft OneDrive.

    Note

    Some companies have restricted access to corporate OneDrive accounts. In this case, you'll have to get the administrator's permission to connect to Excel with your account. The following window opens:

    29_admin_approval.png

    If the security risk is too high, you can use or create a personal Microsoft account and use OneDrive from that account.

  4. Allow NiceLabel Desktop Designer to access your OneDrive data.

    23_allow.png
  5. Confirmation messages about successful connections appear in your browser and Desktop Designer. Close the confirmation window in Desktop Designer.

    24_successful1.png
    25_successful2.png
  6. Select your Excel Spreadsheet, then click OK.

    15_excel_new_4.png

    Important

    If you share your label or solution with other clients, enable sharing of your Excel spreadsheet in OneDrive so other clients can log in with their credentials.

    There are two types of Microsoft accounts: personal accounts and work/school accounts. You can share only Spreadsheets from the same type of account. You can share spreadsheets from one personal account to another. You can share spreadsheets from one work/school account to another, but only within the same organization (or joined organizations). You can't share a spreadsheet between personal and school/work accounts or between work/school accounts from different organizations.

    NiceLabel will prompt other clients for Microsoft login when opening labels/solutions.

    In the current Desktop Designer:

    • You can create a new label or solution only with your own Excel (Microsoft OneDrive) files.

    • You can't create a new label or solution connected to shared Excel (Microsoft OneDrive) files.

    • You can open and print existing labels or solutions connected to shared Excel (Microsoft OneDrive) files.

    Note

    Microsoft doesn't support .xls files in Excel OneDrive edition.

    Test Connection button starts a connection testing procedure It shows if a connection with the selected Excel Spreadsheet has been established successfully. A confirmation or error message appears depending on the connection status.

  7. Your Excel spreadsheet is now connected to your printing solution. Add the table(s) you would like to use to the Selected tables.

    27_add1.png
  8. Columns from your selected table(s) appear in the list of your Dynamic Data Sources. Click OK.

    28_add2.png

You can now connect data from your Excel (Microsoft OneDrive) to your label objects.

Warning

Microsoft login expires after 90 days. After login expires, Desktop Designer will prompt you to sign in with your Microsoft account.

Database Table Configuration

Table Configuration group allows you to configure the connected database table. Use the tabs below to browse through various configuration options.

  • Table name: displays the selected database table's name.

  • Table alias: gives a unique display name to a table. Table alias is useful when the same table is added for more than once under the same database connection. Alias identifies these tables when used in the Desktop Designer.

UUID-5281cd96-792f-e45c-e041-f0df1d9173e5.png

Fields Tab

Available fields frame lists the available fields of the connected database table. Select the fields from the list.

Selected fields display the fields that are used as a connected data source.

The fields can be added to or removed from the Selected fields using Add > and < Remove buttons. To use the entire range of available fields, use Add all >> and << Remove All buttons.

Refresh Fields rereads the connected database table and displays the refreshed available fields.

Filter Tab

Enable filter command activates the table filter. Use it to filter out the displayed database fields as defined by a condition or a group of conditions.

Add condition button creates a custom filter. Select standard qualifiers: equals, does not equal, is less than, is less than or equal to, is greater than, is greater than or equal, like, not like, is blank, is not blank.

Add group button activates nesting two or more conditions for a filter. Use a group to build a more complex filtering condition for a field. The conditions can be joined using AND (all conditions must be true in order to display the record) or OR (only one condition must be true in order to display the record) logical qualifiers.

The list of defined conditions and groups is placed below the table. Remove the filter(s) by clicking the Remove button.

Sorting tab

Field column allows you to decide which field in a table should be used to sort the data.

Sort Order defines whether the records as displayed Ascending or Descending. Select the sort order from the dropdown menu.

Example 54. Example:

In Pasta.xlsx sample database, select Prod_desc field with Ascending order. The data appears sorted by product description and ordered alphabetically from A to Z.

UUID-7cd791fe-7540-7048-a283-8f47b640f991.png

Data Retrieving Tab

Data selection at print time initialization group defines database print time record selection and printing options.

  • Show record selection at print time: enables manual selection of database records before printing. The content of selected records is displayed in label objects and printed.

    Tip

    When enabled, this option adds a selection column to the database table on the print dialog. This column allows individual selection of the records to be printed.

  • Default print: defines which database records would be selected in the print dialog by default.

    • All records: prints out the entire range of selected records.

    • First record: only prints out the first record in a table.

    • Last record: only prints out the last record in a table.

Number of copies per record group sets print quantities for individual database records.

  • Copies per record: defines how many labels should be printed per single database record.

  • Number of copies can be changed at print time: allows setting the number of printed label copies for a single database record right before printing.

Tip

When enabled, this option adds a column to the database table in printing form. This column allows individual settings of print quantity for the selected record.

Advanced options group allows you to set how multiple database records should be displayed.

  • Collect records: displays the content of multiple records in a single object.

    • Delimiter: defines which character should separate the database record values when displayed in an object.

  • Limit number of collected records: enables the maximum number of displayed records in a single object.

    • Records: sets the maximum number of database records to be displayed in an object.

    • Span multiple labels: displays collected records in an object on the first label and continues displaying collected records which follow over the next labels in the print job.

      Example 55. Example:

      By default, Desktop Designer prints one label for each database record.

      1. With connected Pasta.xlsx database, the result is:

        UUID-36b63c02-0558-6df4-02ac-cede5f871d50.png
      2. With enabled Collect records options (3 records), the result is:

        UUID-802016e8-fe0c-8327-8a4e-14965d1dca38.png

        Note that all printed labels contain the same data from the collected table (data from the first 3 rows) and an infinite number of labels is going to be printed by default (Print all labels (unlimited) option selected). To limit the number of labels, enter the number of printed labels.

      3. With enabled Collect records option (3 records) and enabled Span multiple labels option, the result is:

        UUID-3c191a48-fefd-98db-8926-cfb2ea1281b5.png

        With 3 collected records defined, all labels are printed with content of the 3 collected records. Each label includes data of these three records – if Print all labels (unlimited) option is enabled, all database records are printed as sorted in the table.


  • Use the same record for entire print job: prints out the single selected record on the entire range of labels in a print job.

SQL Tab

SQL tab displays current SQL statements that are used with the connected database. Commands in SQL statements determine how to obtain the data from the database (fields, filters, data sorting). The displayed SQL sentence is auto-generated.

By default, SQL statement is read-only. Desktop Designer also allows you to modify it or write your own sentence.

  • Edit SQL: converts table object into a query object. This button allows defining custom tables that are based on SQL queries.

    Note

    This option is for experienced users only. If you make a mistake and create an invalid SQL statement, the query results become unpredictable. No data will be returned from the database or connection to the database will become impossible.

  • Export: saves the current SQL statement as an SQL file on a disk.

  • Import: allows external SQL statements to be used with the current database.

Data Tab

Data tab displays the connected database file table. Use the search field and field selector to find the records.

Database Field Configuration

Details group allows defining the connected database field properties. Set these properties to make the use of a database as simple and efficient as possible.

UUID-9a971d8d-a209-b70f-494c-f7a9de36e69c.png
  • Field name: defined automatically by the source database file.

  • Field alias: gives a unique display name to a field.

Warning

When using Python or VBScript, use field alias names that contain alphanumeric and underscore characters only. The names must not start with a digit.

  • Type: identifies the data type of a database field. This property depends on the connected database field and cannot be edited.

  • Length: (not available for Text File) displays the field length as defined by the database.

  • Code page: provides support for the character sets used in different countries or regions. Code pages are referred to by number – select the appropriate one from the dropdown list.

Data group sets the database field length limitations.

  • Limit field length (truncate excessive content): enables the maximum field length limitation. Extra characters are removed.

    • Length (characters): defines the exact maximum field length using the number of allowed characters.

  • Provisional value defines a custom placeholder variable value in an object while designing labels or forms. In a label object, the provisional value is replaced by the real variable value at print time. In a form object, the real variable value appears when the form is run.

    Tip

    In case of connected databases, the first record's value is taken as the provisional value.

Output data group enables you to store database record content and use it in actions.

Note

Output data can be assigned to a variable with the following form objects: Edit Field, Memo Field, Combo Box, List Box, and Radio Group.

  • Set value to variable: defines the output variable that stores copied value from the database variable.

Example 56. Example:

The output variable is useful in the following cases:

  • Certain actions in solutions are triggered when the database content changes. The changed value is stored in the database variable. Because the database variable value cannot be directly used to set the action, use the output variable. This variable will obtain and store the changed value, and trigger the action after its value will change.

  • Changes in database fields are directly reflected in the connected database. Use the output variable to delay such database updates.

  • In certain cases, database updates are done using a custom SQL statement. Also in this case, the updates are done using the output variable.


Databases with Custom SQL Queries

Desktop Designer allows defining custom tables that are based on SQL queries. Two methods are available for creating a custom SQL query:

  1. Create a new SQL query.

    Go to Dynamic Data Manager > Database Connection Tables and click Create new query in the Available tables field.

  2. Convert an existing database table into a query object.

    Go to Dynamic Data Manager > Table Configuration > SQL Tab and click the Edit SQL button. This converts the connected database into a Query object.

Note

This option is for experienced users only. If you make a mistake and create an invalid SQL statement, the query results become unpredictable. No data will be returned from the database or connection to the database will become impossible.

Note

This option is not available for text database files.

Insert a custom query into the edit field. Click OK when done.

Note

SQL statement field must not be left empty. An error appears if trying to continue without defining the statement.

Database Connection Configuration

Existing database connections are configurable at any time. To add or remove tables from a connected database file, open the Dynamic Data Manager and double-click the database in the Dynamic Data Explorer.

Database Connection group gives information on the connection database.

  • Connection name: defines the name for the connected database file.

  • Description: allows adding additional information and suggestions for the connected database.

  • Connection identifies: currently connected database file. To replace the currently connected file, click the Connection Setup button. New Database Connection Properties window reappears – repeat step 1 to connect to an alternative database file.

Note

You can add the same database table more than once if different record filtering or sorting is required.

Using Text File Structure Wizard

A "real" database must contain structured data. Text databases lack data structure, which means that the structure must be defined before a text file can be used as a data source. Define the structure using the Text File Structure Wizard.

Note

Text File Structure Wizard opens if a text file you are connecting to has not been previously used as an object data source.

To complete the text file structure wizard, complete the below-described steps.

Step 1: Welcome

The welcome window displays the text file you are going to convert into a database and use as a data source of an object. Make sure the correct text file is displayed under Selected text file.

Click Next.

Step 2: Data Encoding

This step sets the Encoding type. The following types are available:

  • Auto

  • ASCII

  • UTF-8

  • UTF-16

  • UTF-16BE

When in doubt which encoding should be used, select Auto for automatic detection of encoding type. Auto identifies the encoding type by reading the BOM unicode character. If BOM is not included or is misinterpreted, Auto presumes, the text uses ASCII encoding.

Inadequate character type identification might cause the database structure to be displayed incorrectly.

Note

While selecting the encoding type, check the preview field. Correct values must be displayed.

Click Next.

Step 3: Data Structure

This step defines the fields to be used in the text database. There are two options:

  • Delimited: fields are separated by a delimiter.

  • Fixed width: fields with predefined (fixed) length.

  • First row contains field names: defines if the field names are included in the first row of the database file.

    • Start import at row defines the row in the database file from which the data import starts. This option enables skipping the rows that do not include data.

Check the preview field. Click Next if the text content is displayed properly.

Step 4: Set Column Breaks

This step depends on the previously selected data structure option – Delimited or Fixed width.

Delimited opens the Fields Delimiter window.

  • Delimiter: defines the delimiting character. Select among the standard characters or insert a custom delimiter in Other field.

  • Text qualifier: a character that indicates textual content. Text qualifier should be used if a delimiter is a part of the text field content. Text qualifier should be used to enclose such field – the text between two text qualifiers is treated as a single field although it contains a delimiter.

Fixed width opens the Set Column Breaks window. Use your mouse pointer to place the vertical lines where the data fields are going to be separated. The lines indicate where new fields start.

Click Next.

Step 5: Fields

Fields window allows you to manipulate and fine-tune the field names and the order in which they are displayed. The below-listed settings are also available:

  • In case of Delimited fields, the Field Name can be customized.

  • With Fixed width fields, the following settings are allowed:

    • Include: includes a field in the selection.

    • Field name: custom name for the field.

    • Offset: separation line distance from the left table edge.

    • Length: field length.

Click Finish. Text file database structure is set.

Database Connection Configuration for Text Files

Connection name defines the name for the connected database file. By default, it displays the filename of the connected file. Insert a new name to make it easy to be found in the Desktop Designer Dynamic Data Explorer.

Description is a field that allows adding additional information and suggestions for the connected database.

Connection identifies the currently connected database file. To replace the currently connected file, click the Connection Setup button. New Database Connection Properties window reappears – repeat step 1 to connect to an alternative database file.

Fields Tab

Available Fields frame lists available fields of the connected database file. Select the field(s) from the list.

Selected fields displays the fields (columns) to be further used as the data source.

Fields can be added to or removed from the Selected fields using Add > and < Remove buttons. To use the entire range of available table fields (columns), use Add all >> and << Remove All buttons.

Define Fields opens the Text File Structure Wizard. This wizard defines the text file database fields.

Note

(Re)defining of fields becomes necessary when the fields are edited or when the field structure gets changed (inserted column, deleted record, etc.).

Refresh Fields rereads the connected database file and displays the refreshed available fields.

Data Retrieving Tab

Data selection at print time initialization group defines database print time record selection and printing options.

  • Show record selection at print time initialization enables you to manually select the database records before printing. The content of selected records is displayed in label objects and printed. When enabled, this option adds a selection column to the database table. This column allows individual selection of the records to be printed.

  • Default print defines how many database records should be printed by default.

    • All records prints out the entire range of selected records.

    • First record only prints out the first record in a table.

    • Last record only prints out the last record in a table.

Number of copies per record sets print quantities for individual database records.

  • Copies per record defines how many labels should be printed per single record. The value can be set manually or dynamically using a data source.

  • Number of copies can be changed at print time option allows you to set the number of printed label copies for a single database record. When enabled, this option adds a column to the database table. This column allows individual setting for print quantity for your selected record.

Advanced options allow you to set how multiple records can be displayed.

  • Collect records displays the content of multiple records in a single object.

    • Delimiter defines how the records are separated when displayed in an object. Set New line (CR/LF) or select a special character from the list.

  • Limit number of collected records enables the maximum number of displayed records in a single object.

    • Records sets the maximum number of records to be displayed in an object.

    • Span multiple labels enables the records to be displayed in an object over multiple labels.

  • Use the same record for entire print job prints out the selected record only.

Data Tab

Data tab provides a preview of the connected database file. It enables field filtering and record search.

Note

Up to 1000 rows are displayed in the preview.