Creating a database consists of several distinct steps. These include defining a data source, selecting the badge templates and photograph compression method, defining the fields for the data and assigning the fields to the various rectangles on the badge.
There are 2 different ways to create the database. If the database is simple and full flexibility is not required, then the Database Creation Wizard is the best approach. But if full control over all aspects is needed, then the "Expert" mode is available. For the purposes of this tutorial we will use the Database Creation Wizard.
A word about fields is in order. The database can contain up to 10 (or optionally an unlimited number of) fields and these fields can either contain alphanumeric, numeric or counter data. You will need to decide which data type for each field. If the data will contain characters other than numbers the choice is obvious; it must be alphanumeric.
Alphanumeric fields can contain general text, or they can be designated to specifically hold a time, date or timestamp (date/time combination). When general text is selected, the field length can also be specified. 40 is a suggested length, but you can change this to any value from 1 to 255 (less with some database types). It is wasteful to specify a length longer than needed, but remember that you will not be able to change this later so make the length long enough to hold the longest expected text.
If the data is always numeric you should use that data type. This type should also be used for numeric data even if the numbers start or end with non-numeric information that is fixed (for example D1234 where the D never changes).
If you have a field that is numeric but you want the program to provide an increasing number automatically, then a counter field type is appropriate.
The number of characters you will be permitted to enter for the field names will vary between database types, but usually at least 10 are allowed. (For more information on field types see Entering the Database Fields in the Design chapter.)
Each field name can have an alias name given it. This alias name will appear in every place in the program where a field name must be given or displayed. The alias name is optional and if not given, the real field name will be used instead. The alias name can contain up to 30 characters.
We will create a database containing 3 fields. These will be the Employee Name, Employee Number and Department.
Here is how to do that:
1.
Click on the tool bar New Database
button
to start the Database Creation Wizard
2. Leave the Use expert database creation screens checkbox unchecked and click the Next> button (it is worth noting that you do not commit to anything you enter into the wizard until you click the Finish button on the last wizard screen)
3. In the wizard screen which appears you must enter a name for your database in the box provided. It must be new and NOT in the list of existing databases shown above the entry box. Enter a unique name of your choice and click the Next> button. This button won't be available until a new unique name is entered.
4. In the wizard window which appears you must define the 3 fields. Enter the first field by typing EmployeeName in the Name box. Note that spaces are not allowed here.
5. In the Alias box enter Employee Name, the alias is the text which to program will show you instead of the more cryptic field name.
6. Make sure that the Alphanumeric radio button is selected and leave the Field Format set to General
7. Make sure the Data Type is set to Alphanumeric and the Length to 40, and then click the Add button. The field will appear in the table above.
8. This time enter EmployeeNumber in the Name box and Employee Number in the Alias, and click the Numeric box. Leave the Places field set to zero. Click the Add button again to add this field.
9. Finally, enter Department in the Name box a delete the text from the Alias box (the field name is not cryptic and so doesn't need an alias), then click the Add button.
10. Inspect the information for the 3 fields in the table and if you made any mistakes click the offending row in the table and correct the data in the boxes, then click Update.
11. When you are happy with the field data click the Next> button.
12. On the wizard screen which appears you must select the badge design you wish to use. The template file you created earlier may be listed in the Template Files box. If it is, select it and you will see its image appear in the main box. If not, use the Browse button to locate it and the select it. When you're happy that you have selected the design you want, click the Next> button.
13. At this point the wizard has all the information needed to create the database. You can use the <Back button to go back and review the previous screens and make an corrections necessary. Note that the wizard shows you the full path to the badge database file it will create. This is the same as, or closely related to, the database name you gave in the second wizard screen. When you are happy with everything click the Finish button.
14. An information screen will appear to let you that the last step is to assign database fields to the chosen design. When you have read the message click OK.
15. The badge template will appear and data fields must be assigned to the various rectangles. You can apply data to any text or bar code rectangle on the badge. These are indicated by a series of numbers. We will select data for these fields from the Database fields and User Information fields as detailed below. We will also use fixed text.
Here are the steps to accomplish the field assignments. We will work on the rectangle areas from top to bottom of the badge:
1. Click on the top rectangular text data area, using the Left mouse button
2. In the pop-up dialog, click on the Add button against Company in the Available Fields section. The text Company appears in the Current Assignments area. The enclosing characters indicate the information came from the User Information. If you make a mistake, click on Clear and try again
3. Click on OK to close the dialog, and note what happens to the data rectangle on the badge
4. Click on the next rectangular data area down
5. Click on the pull-down arrow under From User Information and select Street. Notice that the text is immediately entered in the Current Assignments area
6. Click on OK
7. Click on the next rectangular data area down
8. Click on the pull-down arrow under From User Information and select City
9. Click on OK
10. Click on the next rectangular data area down
11. Type in Employee Number in the Current Assignments area (no quotes, of course, unless you want them on the badge)
12. Click on OK
13. Use the same technique to apply EmployeeNumber, EmployeeName and Department to the final 3 data areas. These fields are all found in the From Database section of the Available Fields area. Notice the fields are surrounded by «» characters to indicate the source as the database
When you are happy with the assignment, click on Save to complete the database design. You will be asked to provide a template name. This can be any meaningful name. For our purposes enter DEFAULT as the name. Naming the templates can be very useful when multiple templates are assigned to a database. Then they can be given names like SALES or ENGINEERING.
In this example we assigned data to every rectangle. It is not necessary to assign every rectangle. If you do not, the result is an empty box on the badge.
If you desire, you can add badge data to your database. See Adding A New Badge for details.