| 4D v18Printing page | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v18
 Printing page 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Printing page -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| Function result | Longint |   | Page number of page currently being printed | |||||
Printing page returns the printing page number. It can be used only when you are printing with PRINT SELECTION or the Print menu in the Design environment.
The following example changes the position of the page numbers on a report so that the report can be reproduced in a double-sided format. The form for the report has two variables that display page numbers. A variable in the lower-left corner (vLeftPageNum) will print the even page numbers. A variable in the lower-right corner (vRightPageNum) will print the odd page numbers. The example tests for even pages, then clears and sets the appropriate variables:
 Case of
    :(FORM Event=On Printing Footer)
       If((Printing page% 2)=0) ` Modulo is 0, it is an even page
          vLeftPageNum:=String(Printing page) ` Set the left page number
          vRightPageNum:="" ` Clear the right page number
       Else ` Otherwise it is an odd page
          vLeftPageNum:="" ` Clear the left page number
          vRightPageNum:=String(Printing page) ` Set the right page number
       End if
 End case
	Product:  4D
	Theme:  Printing
	Number:  
        275
        
        
        
	
	Created:  < 4D v6
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v18)
	
	
	
	
	
 Add a comment
Add a comment