4D v13.4

PAGE SETUP

Home

 
4D v13.4
PAGE SETUP

PAGE SETUP 


 

PAGE SETUP ( {aTable ;} form ) 
Parameter Type   Description
aTable  Table in Table owning form, or Default table, if omitted
form  String in Form to use for page setup

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 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)

 
PROPERTIES 

Product: 4D
Theme: Printing
Number: 299

Not for server

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

Print form
PRINT RECORD
PRINT SELECTION
SET PRINT OPTION