You can generate labels with either the Label editor or a custom report form. If you use a report form, you have more extensive customization options. In particular, you can use the Form editor to insert variables within your labels.
Once you have created a label report form in the Form editor of 4D, you can use it in two ways:
- Using the PRINT LABEL command
The PRINT LABEL([myTable]) statement causes the printing of the current selection of table in the current List form. In this case, 4D uses the markers (width and height) of this form to set the label format. - Using the Label editor
This operation allows you to benefit from both the advanced functions of the Form editor and the layout parameters of the Label editor.
The Label editor only takes the absolute position of the objects present in the form, as well as any margins set, into account. The positions of the markers are ignored.
To create a label report form and print it using the PRINT LABEL command:
- Set the label width, which determines how many labels the PRINT LABEL command prints across the page. The label width is defined by the form width:

If the form size is set to "automatic" or relative to a specific object, its width is computed by adding the horizontal margin to the anchor's coordinates.Insert and set the objects making up each label. - Labels may contain fields and active objects (with which you can associate methods if desired), as well as graphic objects and static text. A subform cannot be printed in a label.

This label contains variables (active objects) whose values are calculated by object methods. For example, the method of the FullName variable concatenates the first and last name of each person and places a space between them:
FullName:=[Customers]FirstName+" "+[Customers]LastName
- Position the objects in the form with respect to the label width.
The label elements must be centered between the left edge of the form and the right edge of the form in order for the space on each side of the label to be the same. The width marker of the Form editor can be used to help positioning elements.

Be sure to take the left and right margins of your labels into account. You can determine these margins by calculating the space between each label and dividing this number by two. For example, if you have labels that are 2.25 inches wide with a margin of .125 inches (1/8 inch) on either side of each label, the label width marker should be placed at 2.625 inches (2 3/8 inches) to ensure that the label text is placed correctly on the labels - Set the control lines so that the Header control line is above the label and the Detail, Break, and Footer control lines are below the label.
The Header control line should be set at zero inches and the Detail control line should be set to the height of the label. To center the text within the label, center the form elements between the Header control line and the Detail control line.

When you print the labels, everything between the Header and the Detail control lines appears on the labels. - Save the form and print the selection using the PRINT LABEL command.