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.
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.
Desktop Designer offers two ways for connecting an object to a database. The diagram below shows the two available options.
-
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.
-
-
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.
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.
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.
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.
-
Option 2: Click the preferred database button in Dynamic Data Manager > Step-by-Step Database wizard ribbon group.
-
Option 3: Click the +Database wizard command in Dynamic Data Explorer or object properties.
Listed below are the available wizard options. To successfully add a database, follow the steps for each database type:
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
-
In the Data menu, click All Databases to open Step-by-Step Database Wizard, then click Next.
-
Database Type Selection window opens. Select Google Sheets, then click Next.
-
Connection Settings window opens. Click Sign in.
-
Your web browser opens with Sign in with Google options.
Click your account to log in.
-
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.
-
-
Confirmation messages about successful connections appear in your browser and Desktop Designer. Close the confirmation window in Desktop Designer.
-
In the Connection Settings window select your Google Spreadsheet, then click Next.
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.
-
Your spreadsheet fields are now connected to your solution. You can remove the fields you don't need. Then click Finish.
-
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.
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.
-
In the Data menu, click All Databases to open Step-by-Step Database Wizard, then click Next.
-
Database Type Selection window opens. Select Excel (Microsoft OneDrive), then click Next.
-
Connection Settings window opens. Click Sign in with Microsoft.
-
Your web browser opens with Microsoft account options.
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:
If the security risk is too high, you can use or create a personal Microsoft account and use OneDrive from that account.
-
Allow NiceLabel Desktop Designer to access your OneDrive data.
-
Confirmation messages about successful connections appear in your browser and Desktop Designer. Close the confirmation window in Desktop Designer.
-
In the Connection Settings window select your Excel spreadsheet, then click Next.
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.
-
-
Your spreadsheet fields are now connected to your solution. You can remove the fields you don't need. Then click Finish.
-
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.
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.
Use this step to select among the existing databases. Select the database and the table you wish to edit. Click Next to proceed.
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:
-
First step sets up the database connection.
-
Second step allows you to choose which database tables will be used.
-
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:
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.
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.
Click OK when done. Database properties window appears.
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.
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.
Click OK when done. Database properties window appears.
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:
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.
Click OK when done.
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.
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.
Click OK when done. Database properties window appears.
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.
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.
Click OK when done. Database properties window appears.
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:
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.
Click OK when done. Database properties window appears.
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:
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.
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.
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.
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:
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.
Click OK. Database properties window appears.
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.
-
Click the Database Connections button in the Dynamic Data Manager ribbon and select Google Sheets as your database type.
-
New Database Connection Properties window opens. Click Sign in.
-
Your web browser opens with Sign in with Google options.
Click your account to log in.
-
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.
-
-
Confirmation messages about successful connections appear in your browser and Desktop Designer. Close the confirmation window in Desktop Designer.
-
Select your Google Spreadsheet, then click OK.
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.
-
Your Google spreadsheet is now connected. Add the table(s) you would like to use to the Selected tables.
-
Columns from your selected table(s) appear in the list of your Dynamic Data Sources. Click OK.
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.
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.
-
Click the Database Connections button in the Dynamic Data Manager ribbon and select Excel (Microsoft OneDrive) as your database type.
-
New Database Connection Properties window opens. Click Sign in with Microsoft.
-
Your web browser opens with Microsoft account options.
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:
If the security risk is too high, you can use or create a personal Microsoft account and use OneDrive from that account.
-
Allow NiceLabel Desktop Designer to access your OneDrive data.
-
Confirmation messages about successful connections appear in your browser and Desktop Designer. Close the confirmation window in Desktop Designer.
-
Select your Excel Spreadsheet, then click OK.
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.
-
-
Your Excel spreadsheet is now connected to your printing solution. Add the table(s) you would like to use to the Selected tables.
-
Columns from your selected table(s) appear in the list of your Dynamic Data Sources. Click OK.
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.
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.
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.
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.
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.
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.
-
With connected Pasta.xlsx database, the result is:
-
With enabled Collect records options (3 records), the result is:
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.
-
With enabled Collect records option (3 records) and enabled Span multiple labels option, the result is:
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 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.
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.
-
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.
Desktop Designer allows defining custom tables that are based on SQL queries. Two methods are available for creating a custom SQL query:
-
Create a new SQL query.
Go to Dynamic Data Manager > Database Connection Tables and click Create new query in the Available tables field.
-
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.