4D v16.3PRINT LABEL |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
PRINT LABEL
PRINT LABEL
PRINT LABEL enables you to print labels with the data from the selection of aTable. If do not specify the document parameter, PRINT LABEL prints the current selection of aTable as labels, using the current output form. You cannot use this command to print subforms. For details about creating forms for labels, refer to the 4D Design Reference manual. If you specify the document parameter, PRINT LABEL enables you to access the Label Wizard (shown below) or to print an existing Label document stored on disk. See the following discussion. 64-bit version: 32-bit version: Compatibility note: The 32-bit version of the label editor only supports ASCII characters. If you need to use a more extended character set, you have to print labels using the current output form. By default, PRINT LABEL displays the printer dialog boxes (in 4D 32-bit versions) or the Print job dialog box (in 4D 64-bit versions) before printing. If the user cancels either of the printer dialog boxes, the command is canceled and the labels are not printed. You can suppress these dialog boxes by using either the optional asterisk (*) parameter or the optional “greater than” (>) parameter:
Note that this parameter has no effect if the Label Wizard is involved. If the Label Wizard is not involved, the OK variable is set to 1 if all labels are printed; otherwise, it is set to 0 (zero) (i.e., if user clicked Cancel in the printing dialog boxes). If you specify the document parameter, the labels are printed with the label setup defined in document. If document is an empty string (""), PRINT LABEL will present an Open File dialog box so the user can specify the file to use for the label setup. If document is the name of a document that does not exist (for example, pass char(1) in document), the Label Wizard is displayed and the user can define the label setup. Note: If the table has been declared “invisible” in Design mode, the Label Wizard will not be displayed. 4D Server: This command can be executed on 4D Server within the framework of a stored procedure. In this context:
The following example prints labels using the output form of a table. The example uses two methods. The first is a project method that sets the correct output form and then prints labels: ALL RECORDS([Addresses]) ` Select all records The second method is the form method for the form "Label Out". The form contains one variable named vLabel, which is used to hold the concatenated fields. If the second address field (Addr2) is blank, it is removed by the method. Note that this task is performed automatically with the Label Wizard. The form method creates the label for each record: ` [Addresses]; "Label Out" form method The following example lets the user query the [People] table, and then automatically prints the labels “My Labels”: QUERY([People]) The following example lets the user query the [People] table, and then lets the user choose the labels to be printed: QUERY([People]) The following example lets the user query the [People] table, and then displays the Label Wizard so the user can design, save, load and print any labels: QUERY([People])
See also
|
PROPERTIES
Product: 4D HISTORY
Modified: 4D 2004 ARTICLE USAGE
4D Language Reference ( 4D v16) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||