Skip to content
Advertisement

ZPL Loop function

I’m looking for any idea can help to setup a ZPL label using a loop function to gather the information from SQL Table and print them on a label

I have a Table in SQL DB has those fields Product QTY ORDER_NR

for example:

I have the order 111022 has 3 items lines

  • 50023
  • 50037
  • 50099

And I want to create a label using the ZPL code with a loop functions so the all items ordered will be printed on that label

Order : 111022

  • Item : 50023 – QTY = 7
  • Item : 50037 – QTY = 5
  • Item : 50099 – QTY = 2

Thank you,

Advertisement

Answer

ZPL is only a markup language, unfortunately there are no loops and also no database functions!

To achieve what you want, you have to write some sort of software in a programming language of your choice. This software will then read the data from the database using SQL and depending on the gathered records it can then write ZPL code to print them on the label.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement