Level

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 3


Level Number

ParameterTypeDescription
This command does not require any parameters
Function resultNumberCurrent break or header level

Description

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 4th Dimension prints a break on the first sorted field, 2 when 4th Dimension 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 Details)
            ` 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

See Also

ACCUMULATE, BREAK LEVEL, Form event, PRINT SELECTION.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next