4D v13.4PRINT SELECTION |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
PRINT SELECTION
PRINT SELECTION
PRINT SELECTION prints the current selection of aTable. The records are printed with the current output form of the table in the current process. PRINT SELECTION performs the same action as the Print menu command in the Design environment. If the selection is empty, PRINT SELECTION does nothing. By default, PRINT SELECTION displays the printer dialog boxes before printing. If the user cancels either of the printer dialog boxes, the command is canceled and the report is not printed. You can delete these dialog boxes by using either the optional asterisk (*) parameter or the optional “greater than” (>) parameter:
During printing, the output form method and/or the form’s object methods are executed depending on the events that are enabled for the form and objects using the Property List window in the Design environment, as well as on the events actually occurring:
You can check whether PRINT SELECTION is printing the first header by testing Before selection during an On Header event. You can also check for the last footer, by testing End selection during an On Printing Footer event. For more information, see the description of these commands, as well as those of Form event and Level. To print a sorted selection with subtotals or breaks using PRINT SELECTION, you must first sort the selection. Then, in each Break area of the report, include a variable with an object method that assigns the subtotal to the variable. You can also use statistical and arithmetical functions like Sum and Average to assign values to variables. For more information, see the descriptions of Subtotal, BREAK LEVEL and ACCUMULATE. Warning: Do not use the PAGE BREAK command with the PRINT SELECTION command. PAGE BREAK is to be used with the Print form command. After a call to PRINT SELECTION, the OK variable is set to 1 if the printing has been completed. If the printing was interrupted, the OK variable is set to 0 (zero) (i.e., the user clicked Cancel in the printing dialog boxes). 4D Server: This command can be executed on 4D Server within the framework of a stored procedure. In this context:
The following example selects all the records in the [People] table. It then uses the DISPLAY SELECTION command to display the records and allows the user to highlight the records to print. Finally, it uses the selected records with the USE SET command, and prints them with PRINT SELECTION: ALL RECORDS([People]) ` Select all records |
PROPERTIES
Product: 4D
INDEX HISTORY
Modified: 4D 2004 SEE ALSO
ACCUMULATE |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||