To use forms for printing is a very efficient method to make the printing process faster and aligned with your business process. Unlike with labels, printing with forms is done using form actions.

Tip

Before creating and designing a form which is going to be used for printing, make sure your label is properly designed and ready to be printed. Do not forget to select the appropriate printer in the label properties dialog.

  • Simple printing with forms. Use object forms to initiate printing. Printing-related actions can be assigned to various form objects. The assigned actions are triggered by events – if an event is triggered, printing process starts.

  • Printing Labels whose Names are Read from Database. Use a form to dynamically define a label which is going to be printed. This method represents an upgrade of simple printing with forms as it reads the label name from a connected database.

Simple Printing with Forms

Follow the below listed steps to use a form object to print a label when a user clicks it.

  1. Create a new form.

  2. Add a form object to the design surface. Button is the most appropriate object to be clicked.

  3. Double-click the button to open its properties.

  4. Open the Events tab.

  5. In our case, button object already offers the On click event. Click Actions ... to open the Actions editor.

UUID-d4f10d87-cf27-35d9-34af-89f36a5f407d.png
  • Print label action is listed among popular actions in the Actions editor ribbon. Click it to assign it to the button.

UUID-85eeffeb-7f0a-331a-b5c7-211d56720958.png

Note

Print label is an action that automatically adds Open label action in front of it.

  • Click Open label action in the Actions editor to open its properties. Label name defines which label should be printed.

UUID-2a0b9d25-67c9-6038-978b-000907221123.png
  1. Click OK.

  2. Run the form and click the button. The label gets printed.

Printing Labels whose Names are Read from Database

This label printing method enables you to dynamically define a label to be printed using a connected database. Use the form to read the label name from the database and print it.

Follow the below steps to create a basic form for database-defined label printing.

  1. Create a new form.

  2. Add a form object to the design surface. Button is the most appropriate object for clicking on.

  3. Double-click the button to open its properties.

  4. Open the Events tab.

  5. In our case, button object already offers the On click event. Click Actions ... to open the Actions editor.

UUID-d4f10d87-cf27-35d9-34af-89f36a5f407d.png
  • If you plan to print all labels listed in the database table, or a selection of included labels, add action named For every record.

  • Use all records: prints all records in the database table.

  • Use selected records

  • Add Print label action. This action is listed among popular actions in the Actions editor ribbon. Click it to assign it to the button.

UUID-85eeffeb-7f0a-331a-b5c7-211d56720958.png

Note

Print label is an action that automatically adds Open label action in front of it.

  • Click Open label action in the Actions editor to open its properties. Label name defines which label should be printed. Select the Data source option to enable the selection of dynamic data sources.

  • Click the dropdown list and select an existing database field or create a new database connection using the database connection wizard.

UUID-c3f8a7c8-8830-1f75-6f8e-25fdb7e9e836.png
  1. Click OK.

  2. Run the form and click the button. A label defined by the database gets printed.