4D v14.3

Level

Home

 
4D v14.3
Level

Level 


 

Level -> Function result 
Parameter Type   Description
Function result  Longint in 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.

Example  

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

 
PROPERTIES 

Product: 4D
Theme: Printing
Number: 101

Not for server

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

ACCUMULATE
BREAK LEVEL
Form event
PRINT SELECTION

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)