version 3
Level Number
Parameter | Type | Description | ||||
This command does not require any parameters | ||||||
Function result | Number | Current 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 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 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.