In this blog post I would like to go through the new Label layout for License plate labels. This is a new capability that is available in 10.0.31.
- when you need to display on the label additional information that is not available in the WHSLicensePlateLabel table. Maybe you need to add information from the corresponding document that is stored, for example, in the Purchase order;
- when you need to display on your labels values with country-specific decimal and thousands separator;
- when you need to generate labels with repeating rows or even multiple labels out of one template.
Let's walk through the configuration and process.
To set up warehouse parameters for license plate label printing, follow these steps:
The label layout controls what information is printed on the label and how it's laid out. Here, you enter the ZPL code that is sent to the printer. Typically, you will copy this code from a label designer program.
As the system generates a label, it can replace field and method names that are used in the label layout with actual values.
CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNM,0^MTT^PON^PMN^LH0,0^JMA^PR8,8~SD15^JUS^LRN^CI27^PA0,1,1,0^XZ
^XA
^MMT
^PW831
^LL609
^LS0
^FT19,59^A0N,28,28^FH\^CI28^FDLicense plate label^FS^CI27
^FT19,148^A0N,42,43^FH\^CI28^FDItem: ^FS^CI27
^FT128,148^A0N,42,43^FH\^CI28^FD$ItemId$ ^FS^CI27
^BY3,3,180^FT116,525^BCN,,Y,N
^FH\^FD$LicensePlateId$^FS
^FT19,206^A0N,42,43^FH\^CI28^FDQty:^FS^CI27
^FT128,206^A0N,42,43^FH\^CI28^FD$Qty$^FS^CI27
^PQ1,0,1,Y^XZ
Second label layout that we are creating is when we need to display data from Purchase order .
1. Go to Warehouse > Setup > Document routing > Label layout data source.
2. Create a label layout data source that includes a join to the Purchase order table.
3. On the Action Pane, select New.
4. Set the following values for the new label layout data source:
○ Label layout data source ID: Enter LPPlusPurchOrder.
○ Description: Enter License plate + Purchase order.
○ Label layout type: Select License plate label.
5. On the Action Pane, select Save.
6. On the Action Pane, select Edit query.
7. A standard query editor dialog box appears. On the Joins tab, add a join to the required tables.
8. Go back to the Label layout page, and then, in the Label layout data source ID field, select the new record for a new or existing layout.
9. You can now add the new field values to the print layout code. Be sure to reference the correct table.field-names values in the ZPL code. The additional tables will include a number (_#) as a suffix.
Example will look as below:
CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNM,0^MTT^PON^PMN^LH0,0^JMA^PR8,8~SD15^JUS^LRN^CI27^PA0,1,1,0^XZ
^XA
^MMT
^PW831
^LL609
^LS0
^FT19,59^A0N,28,28^FH\^CI28^FDLicense plate label^FS^CI27
^BY3,3,180^FT116,525^BCN,,Y,N
^FH\^FD$WHSLicensePlateLabel.LicensePlateId$^FS
^FT19,148^A0N,42,43^FH\^CI28^FDItem: ^FS^CI27
^FT128,148^A0N,42,43^FH\^CI28^FD$WHSLicensePlateLabel.ItemId$^FS^CI27
^FT19,206^A0N,42,43^FH\^CI28^FDQty:^FS^CI27
^FT128,206^A0N,42,43^FH\^CI28^FD$WHSLicensePlateLabel.Qty$^FS^CI27
^FT19,264^A0N,42,43^FH\^CI28^FDOrder:^FS^CI27
^FT128,264^A0N,42,43^FH\^CI28^FD$PurchTable_1.PurchId$^FS^CI27
^PQ1,0,1,Y^XZ
Third label layout that we are creating is when we need to use more complex structure header, row and footer . We will do it with the help of label template support
If you must create more advanced label layouts, you can benefit from using some of the widely available label generation tools that are described in Document routing label layout.
To format a label by using header, row, and footer elements, open the Label layout page, select or create a layout, and set the Enable label template support option to Yes for the new or selected layout. Then use the {{Header ... }}, {{Row ... }}, and {{Footer ... }} elements in your code. The following example shows a label that includes all these elements. It prints data about items that are placed in a license plate.
First, we need to create label layout data source.
And the Query
Define to print only Put lines
Option 1:
{{LabelStart
^FX ... ZPL commands that will be printed on every label ...
CT~~CD,~CC^~CT~
^XA
~TA000
~JSN
^LT0
^MNM,0
^MTT
^PON
^PMN
^LH0,0
^JMA
^PR8,8
~SD15
^JUS
^LRN
^CI27
^PA0,1,1,0
^XZ
^XA
^MMT
^PW831
^LL609
^LS0
}}
{{Header
^FT31,59^A0N,28,28^FH\^CI28^FDLicense plate label with work lines^FS^CI27
^BY3,3,180^FT116,525^BCN,,Y,N
^FH\^FD$WHSLicensePlateLabel.LicensePlateId$^FS
}}
{{Row Table=WHsWorkLine_1 StartY=148 IncY=68 RowsPerLabel=5
^FT19,$position.YPos$^A0N,42,43^FH\^CI28^FDLine:^FS^CI27
^FT128,$position.YPos$^A0N,42,43^FH\^CI28^FD$WHSWorkLine_1.LineNum$^FS^CI27
^FT250,$position.YPos$^A0N,42,43^FH\^CI28^FD$WHSWorkLine_1.WMSLocationId$^FS^CI27
}}
{{LabelEnd
^PQ1,0,1,Y
^XZ
}}
Option 2:
{{LabelStart
^FX ... ZPL commands that will be printed on every label ...
CT~~CD,~CC^~CT~
^XA
~TA000
~JSN
^LT0
^MNM,0
^MTT
^PON
^PMN
^LH0,0
^JMA
^PR8,8
~SD15
^JUS
^LRN
^CI27
^PA0,1,1,0
^XZ
^XA
^MMT
^PW831
^LL609
^LS0
}}
{{Header
^FT31,59^A0N,28,28^FH\^CI28^FDLicense plate label with work lines^FS^CI27
^BY3,3,180^FT116,300^BCN,,Y,N
^FH\^FD$WHSLicensePlateLabel.LicensePlateId$^FS
}}
{{Row Table=WHsWorkLine_1 StartY=400 IncY=68 RowsPerLabel=5
^FT19,$position.YPos$^A0N,42,43^FH\^CI28^FDLine:^FS^CI27
^FT128,$position.YPos$^A0N,42,43^FH\^CI28^FD$WHSWorkLine_1.ItemID$^FS^CI27
^FT250,$position.YPos$^A0N,42,43^FH\^CI28^FD$WHSWorkLine_1.QtyWork$^FS^CI27
}}
{{LabelEnd
^PQ1,0,1,Y
^XZ
}}
Make sure that network printers setup.
Specify date, time, and number formats
To set the formats of date, time, and number values that are shown in a label layout, open the Label layout page, select or create a layout, and set the Date, time, and number format field to the language that uses the formats that you want.
Set up license plate label routing
To specify the license plate label layouts that are used and where they are printed, you must define a Document routing record, as described in the following procedure.
1. Go to Warehouse management > Setup > Document routing > Document routing.
2. In the Work order type field, select Purchase orders option.
3. On the Action Pane, select New to create a routing record.
4. On the header of the new routing record.
5. On the Document routing printers FastTab, assign the printer and label layout that should be used when the criteria for the routing record are met. Select New on the toolbar to add a line to the grid.
Set license plate labels to be printed automatically when purchase orders are received
If you want a license plate label to be printed automatically each time that a new purchase order is received, you can configure eigher work template with Print step or mobile device menu item.
Option 1
1. Go to Warehouse management > Setup > Work> Work templates.
2. In the Work order type field, select Purchase orders option.
3. On the Action Pane, select Edit.
4. Select the work template that license plate labels should automatically be printed for. If you're working with sample data, select the row where the Work template ID field is set to 24 PO Receipt.
5. Select New in the Work Template Details section.
6. For the new work template line, set the following fields:
○ Work type – Select Print .
○ Work class – Select Purchase.
7. Select Save.
8. Use Move up button to place new line between Pick and Put lines.
9. Close the page.
Option 2 (most preferable way of doing it)