4D v16.3FORM LOAD |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
FORM LOAD
FORM LOAD
The FORM LOAD command is used to load the form (project or table) in memory in the current process in order to print its data or parse its contents. There can only be one current form per process. In order to be able to execute this command, a print job must be opened beforehand using the OPEN PRINTING JOB command. The OPEN PRINTING JOB command makes an implicit call to the FORM UNLOAD command, so in this context it is necessary to execute FORM LOAD. Once loaded, this form becomes the current printing form. All the object management commands, and in particular the Print object command, work with this form. If a printing form has already been loaded beforehand (via a previous call to the FORM LOAD command), it is closed and replaced by form. You can open and close several project forms in the same print session. Changing the printing form via the FORM LOAD command does not generate page breaks. It is up to the developer to manage page breaks. Only the On Load form event is executed during the opening of the project form, as well as any object methods of the form. Other form events are ignored. The On Unload form event is executed at the end of printing. To preserve the graphic consistency of forms, it is recommended to apply the "Printing" appearance property regardless of the platform. The current printing form is automatically closed when the CLOSE PRINTING JOB command is called. Compatibility note: In versions of 4D prior to v14, the FORM LOAD command (named OPEN PRINTING FORM) accepted an empty string in the form parameter to close the current project form. This syntax is no longer supported and returns an error. You must use the FORM UNLOAD command or the CLOSE PRINTING JOB command in order to close the form. This consists in loading an off-screen form for parsing purposes. To do this, just call FORM LOAD outside the context of a print job. In this case, form events are not executed. FORM LOAD can be used with the FORM GET OBJECTS and OBJECT Get type commands in order to perform any type of processing on the form contents. You must then call the FORM UNLOAD command in order to release the form from memory. Note that in all cases, the form on screen remains loaded (it is not affected by the FORM LOAD command) so it is not necessary to reload it after calling FORM UNLOAD. When the command is executed from a component, it loads the component forms by default. If you pass the * parameter, the method loads the host database forms. Reminder: In the off-screen context, do not forget to call FORM UNLOAD to avoid any risk of memory overflow. Calling a project form in a print job: OPEN PRINTING JOB Calling a table form in a print job: OPEN PRINTING JOB Parsing of form contents to carry out processing on text input areas: FORM LOAD([People];"my_form")
See also
|
PROPERTIES
Product: 4D
HISTORY
Created: 4D v12 ARTICLE USAGE
4D Language Reference ( 4D v16) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||