Menu

4 - Configuration

Florestan Code

Configuration

All configuration of the LabelCast software is done through the desktop client, also if you plan to use the web application.
You can configure two things using the menu buttons:

• Label Profiles
• Label Printers

A label profile is a collection of settings which configure which data should be input, whether a database should be queried for further information, database connection and query information, the label template and the default printer to use. A profile represents a specific type of label and all information regarding it.
Label printers can be configured separately. Each profile has a default printer which will be used in absence of further specification. But any user can override this, allowing the same type of label to be printed to many printers.

Note

The desktop application is used for profile configuration for the web application as well – the web app itself has no configuration pages.
Therefore, if you plan to use the web application on a web server, you must install the desktop application on the same server as well. In this scenario, you can use the desktop app as a convenient test system, allowing for quick tests of your label profile definitions and label formats.

Basic Label Profile Configuration

To create a new profile, click on the ADD button of the app. After entering the desired property values, press SAVE to persist the profile definition.
Following are the properties which can be configured for a profile.

General

Property Description
Name Name of the profile (must be unique)
Description Detailed description
Abbreviation Abbreviated name – this will show in the selection dropdown

Database

Property Description
Database Type Currently supported are SQLite, PostgreSQL, MS SQL Server, Oracle
Connection String Input here the connection string to connect to your database
Time Zone Time zone of the database server. Some databases require this information which is why this property exists.
SQL Query A query string to obtain a single record based on user input. The WHERE clause Of the query should contain the configured Search-Fields and the SELECT clause must contain all Data-Fields and must also contain all Search-Fields (see below Fields section). Field names are referenced in curly braces: ID = {id}
SQL Numeric Code Query Query to obtain a single record based on a numeric code input into the first search-field. (This will only work if the normally expected input into that first search field is expected to be non-numeric.) The SQL query is likely to look a bit awkward because you need to reference the field-name of the first search field and then correlate it to a likely very different column in the SQL.
Search SQL Query This is a separate query to obtain one or more records to choose from, when the user entered percent (%) wildcard characters in his input. The query must include all of the Data-Fields in the SELECT clause – the same as in the main SQL Query.
Display Field Name of field to display to the user when showing the list of choices from the Search SQL query. Note – the capitalization of this field MUST match the column name returned by the Search SQL Query.

Fields

Property Description
Search Fields List of fields a user should input to filter the database query by (these would appear in the WHERE clause of the SQL query). They are shown in the UI as input fields.
Data Fields Field names of the database query result (SELECT clause column names)
Editable Fields Fields for user input which are not sent to the database for query and are not database result fields either. These fields appear in the UI as input fields.

Search Fields and Editable Fields are optional. You do not need query a database at all, and you do not need to have additional editable fields.

The same field can appear in both Data Fields and Editable Fields. Manual edits override the values from the database, allowing the user to edit the value returned from the database.

Label Printing

Property Description
Label Template Path to Zebra ZPL label template file
Default Printer This is the default printer to use for labels of this type.

There are further configuration properties related to JSON and XML APIs, which are described later in this manual.

Example

Name                    Standard Label
Description             Standard Label for code, description and price
Abbreviation            STANDARD

Database Type           SQL Server
Connection String       Server=mySRV; Database=myDB; Trusted_Connection=True;
Time Zone               UTC
SQL Query               SELECT NAME, DESCRIPT, PRICE FROM TEST WHERE NAME = {name}  
SQL Numeric Query       SELECT NAME, DESCRIPT, PRICE FROM TEST WHERE ID = {name}    
SQL Search Query        SELECT NAME, DESCRIPT, PRICE FROM TEST WHERE NAME LIKE {name}
Display Field           DESCRIPT

Search Fields           Code
Data Fields             Descript, Price
Editable Fields         Price, Weight

Label Template          c:\Templates\standard_lbl.prn
Default Printer         OFFICE2

In this example, the field “Price” appears both in Data-Fields and Editable-Fields – the database query will return the value, but the user can then still change it. Manual edits override the values from the database.

Label Printer Configuration

Property Description
Name The name of printer (does not need to be the network host name). Names should be short as they appear in the selection dropdown.
Description Detailed description.
IP Address Network address to reach the printer
Port Network port number. By default, this is 9100 for Zebra printers.

Example

Name                OFFICE2
Description         Zebra barcode label printer No. 2 in the office
IP Address          192.168.0.151
Port                9100

Note that currently only networked printers are supported by the software. 

Advanced Profile Configuration - JSON and XML API

If the web application is installed, it supports submitting label data in JSON or XML format over HTTP as POST request.
Profile and printer configuration is always done through the desktop app, however. Additional configuration properties exist to enable API submissions. These are explained in detail in the section Label Request API of this manual.

[1 - Overview]
[3 - Desktop App]


Related

Wiki: 1 - Overview
Wiki: 3 - Desktop App
Wiki: 5 - Web Application
Wiki: 6 - Label Request API