| 4D v15.4Level | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v15.4
 Level 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Level -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| Function result | Longint |   | Current break or header level | |||||
Level is used to determine the current header or break level. It returns the level number during the On Header and On Printing Break events.
Level 0 is the last level to be printed and is appropriate for printing a grand total. Level returns 1 when 4D prints a break on the first sorted field, 2 when 4D prints a break on the second sorted field, and so on.
This example is a template for a form method. It shows each of the possible events that can occur while a summary report uses a form as an output form. Level is called when a header or a break is printed:
  ` Method of a form being used as output form for a summary report
 $vpFormTable:=Current form table
 Case of
  ` ...
    :(Form event=On Header)
  ` A header area is about to be printed
       Case of
          :(Before selection($vpFormTable->))
  ` Code for the first break header goes here
          :(Level=1)
  ` Code for a break header level 1 goes here
          :(Level=2)
  ` Code for a break header level 2 goes here
  ` ...
       End case
    :(Form event=On Printing Detail)
  ` A record is about to be printed
  ` Code for each record goes here
    :(Form event=On Printing Break)
  ` A break area is about to be printed
       Case of
          :(Level=0)
  ` Code for a break level 0 goes here
          :(Level=1)
  ` Code for a break level 1 goes here
  ` ...
       End case
    :(Form event=On Printing Footer)
       If(End selection($vpFormTable->))
  ` Code for the last footer goes here
       Else
  ` Code for a footer goes here
       End if
 End case
	Product:  4D
	Theme:  Printing
	Number:  
        101
        
        
        
	
	Created:  < 4D v6
	
	
	
	
	4D Language Reference ( 4D v15.4)
	
	
	4D Language Reference ( 4D v15)
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v15.3)
	
	
 Add a comment
Add a comment