PAGE SETUP

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 3


PAGE SETUP ({aTable; }form)

ParameterTypeDescription
aTableTableTable owning form, or
Default table, if omitted
formStringForm to use for page setup

Description

PAGE SETUP sets the page setup for the printer to that stored with form. The page setup is stored with the form when the form is saved in the Design environment.

In the following three cases, the printing dialog boxes are not displayed and the printing is performed with the default print settings. :

Calling PRINT SELECTION to which you pass the optional * parameter

Calling PRINT RECORD to which you pass the optional * parameter

Issuing a series of calls to PRINT FORM not preceeded by a call to PRINT SETTINGS.

Calling PAGE SETUP enables you, in this case, to skip the printing dialog boxes AND to use print settings other than the default ones.

Example

Several (empty) forms are created for a table named [Design Stuff]. The form "PS100" is assigned a page setup with a scaling of 100%, the form "PS90" is assigned a page setup with a scaling of 90%, and so on. The following project method enables you to print the selection of a table using various scalings without having to specify the scaling in the printing dialog boxes (which are not displayed), each time:

      ` AUTOMATIC SCALED PRINTING project method
      ` AUTOMATIC SCALED PRINTING ( Pointer ; String {; Long } )
      ` AUTOMATIC SCALED PRINTING ( ->[Table]; "Output form" {; Scaling } )
   If (Count parameters>=3)
      PAGE SETUP([Design Stuff];"PS"+String($3))
      If (Count parameters>=2)
         OUTPUT FORM($1->;$2)
      End if
   End if
   If (Count parameters>=1)
      PRINT SELECTION($1->;*)
   Else
      PRINT SELECTION(*)
   End if

Once this project method is written, you call it in this way:

      ` Look for current invoices
   QUERY ([Invoices];[Invoices]Paid=False)
      ` Print Summary Report in 90% reduction
   AUTOMATIC SCALED PRINTING (->[Invoices];"Summary Report";90)
      ` Print Detailed Report in 50% reduction
   AUTOMATIC SCALED PRINTING (->[Invoices];"Detailed Report";50)

See Also

Print form, PRINT RECORD, PRINT SELECTION, SET PRINT OPTION.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next