KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Printing labels from output form without label wizard
PRODUCT: 4D | VERSION: 17 | PLATFORM: Mac & Win
Published On: November 8, 2018
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

PRINT LABEL is a versatile method that allows users different ways to print labels from the current selection of a table. One option is to specify the output document name within the PRINT LABEL method as this allows access to the label wizard for additional customization. Another method is to format your label design on the output form itself. In order to do this alternative, first create an blank table form under your preferred table and include your specified fields or variables from the table as shown. More importantly, also be sure that the included fields and variable objects are within the paper margins or else the PRINT LABEL method may not print the form as expected.

Good Example: Objects are within paper margins


Bad example: Objects are outside paper margins


Next, simply create a method that will get a current selection, set your specified form as the output form, and call PRINT LABEL for your selected table. In the example below, a current selection was created for the People table, the table form "Form1" was set as the output form, and PRINT LABEL was called for the People table.

ALL RECORDS([People])
FORM SET OUTPUT([People];"Form1")
PRINT LABEL([People])


Now when the method is run, the printer dialog should appear and if the print preview option is selected, the labels should now appear as designed from the output form.