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
Text File Structure Wizard window opens if a structure for a text file you are connecting hasn't been defined previously. For more information, see Using Text File Structure Wizard.
Note
After finishing this procedure, a text definition .sch file with the same name as the text database file and is created in the same folder. Next time the wizard is used on the same file, this procedure is no longer required.
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
Tables group allows you to select which tables of the connected database should be used as a data source.
-
Available tables: available tables in the selected database.
-
Selected tables: tables that are used as a data source.
Click Add > or < Remove buttons to add or remove the tables from the Selected fields.
Note
When editing an existing database, a table cannot be removed if used in a script, function, action, or connected to a label or form object.
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
This step specifies the number of label copies to be printed for each database record.
Fixed number of printed labels lets you insert the number of copies manually.
Dynamically defined number of printed labels sets the number dynamically using a data source value.
Example
The number of printed records can be defined using a variable value. Its value might be set in another label or form object.
Use the same record for entire print job prints out the single selected record on the entire range of labels in a print job.
Click Next to proceed or Finish to continue working with the object.
For more about defining the number of printed copies, see Database Table Configuration.
Step 5: Create Objects
This step lets you decide whether new Text objects that display the content retrieved from database fields should be added to a label/form or not.
Create Objects step is visible when:
-
Starting the database wizard from Data tab ribbon and adding a new database by clicking the database button.
-
Starting the wizard in Dynamic Data Explorer or using a generic object Add database selector.
Tip
The Create Objects step differs if you are adding a database while designing a label or a form. See the differences below.
Create Objects step for label designing:
-
Create a label text object for each field: adds a Text object that contains database field content.
-
Do not create any label objects: skips adding new objects.
Create Objects step for form designing:
-
Create an edit field object for each field: adds an edit field object to the form. The added object(s) contains database field content.
-
Create a form table object: adds a database table object to a form. The added object(s) contains database field content.
-
Do not create any label objects: skips adding new objects.
Note
The number of added objects depends on the number of fields in the database.
Click Next.
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 Step 4: 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.