Data-driven printing
Data-driven printing lets you control the printing process using values from your data source. Beyond populating labels with data, you can dynamically select labels, specify print quantities, choose printers, and save output to different files. This makes it possible to automate complex printing workflows without manually changing print settings.
How data-driven printing works
AzureLabel uses special fields in your data source to control the printing process. Depending on the control fields provided, each record can select a label, specify a print quantity, choose a printer, or specify an output file.
These control fields are independent. You can use only those required for your workflow.
For example, the printer field can select a printer for the current label even when
no label field is provided.
Supported control fields
label– Selects which label to print. If no value is provided, AzureLabel automatically uses the current label.printQuantity– Sets the number of copies to print.printer– Selects the printer to use.outputFile– Specifies the output file.
The following example demonstrates common combinations of control fields. Each record uses only the fields required for its printing task, and any control fields can be used individually or combined as needed.

Control which label to print
Use the label field to control which label is printed for each record.
The field value can contain either a label name or the full path to a label file.
If no value is provided, AzureLabel prints the current label.
- If the value is a label name, AzureLabel searches for the label in the user's Labels folder.
- If the value is a full path, AzureLabel loads the specified label directly.
AzureLabel recognizes the label field by its name, regardless of the data source.
In Excel and CSV files, simply create a column named label. If your data source
does not contain such a field, you can add it manually in Import Settings.
Control the print quantity
Use the printQuantity field to specify how many copies to print.
For labels with multiple designs, the field can also specify separate quantities for each
design and control whether the designs are printed in groups or alternated.
Records are printed only when the printQuantity value is greater than zero.
AzureLabel recognizes the printQuantity field by its name, regardless of the data source.
In Excel and CSV files, simply create a column named printQuantity.
Alternatively, if your data source already contains a field representing the required print quantity, enable Use this field to set print quantity for that field in Import Settings instead of renaming it.
Control print quantities for multiple designs
When a label contains multiple designs, the printQuantity field can control how many
times each design is printed and how the designs are arranged in the print sequence.
Use the same quantity for every design
Enter a single value to print every design the same number of times.
4– Prints each design four times.
Print designs in groups
Separate values with commas to specify a different print quantity for each design. The values correspond to the designs in their defined order.
2,3– Prints the first design twice, followed by the second design three times.3,0– Prints the first design three times and skips the second design.
Alternate between designs
Separate values with slashes to alternate between designs instead of printing each design as a separate group.
2/2– Prints: Design 1 → Design 2 → Design 1 → Design 23/2– Prints: Design 1 → Design 2 → Design 1 → Design 2 → Design 1
Control which printer to use
Use the printer field to control which printer is used for each record.
The field value must match the name of an installed printer.
AzureLabel recognizes the printer field by its name, regardless of the data source.
In Excel and CSV files, simply create a column named printer.
Control printers for multiple designs
If a label contains multiple designs, specify one printer name for each design. Separate printer names with commas. The values correspond to the designs in their defined order.
Control the output file
Use the outputFile field to specify where the printed output should be saved.
The field value must contain the full path to the output file.
AzureLabel recognizes the outputFile field by its name, regardless of the data source.
In Excel and CSV files, simply create a column named outputFile.
Control output files for multiple designs
If a label contains multiple designs, specify one output file for each design. Separate file names with commas. The values correspond to the designs in their defined order.
Combining control fields
All control fields are independent and can be combined as needed. A single record can select the label to print, control the print quantity, choose a printer, and specify an output file.
Advanced examples
The control fields described in this section can be supplied by any supported data source. The following examples demonstrate how to provide them from SQL queries and JSON data.
SQL:
SELECT
Name,
Quantity AS printQuantity,
PrinterName AS printer,
LabelName AS label
FROM Products
JSON:
{
"name": "Product A",
"label": "Product label",
"printQuantity": 4,
"printer": "Zebra ZD421"
}The same control fields can be used with any AzureLabel-supported data source, including Excel, CSV, databases, JSON, REST APIs, and custom integrations.