$framedepth

Return the number of lines needed to print a frame as drawn on the component, without allowing for expansion

$framedepth { (Entity) }

Parameters

Parameters
Parameter Data Type Description
Entity String Name of the entity frame; optional. If omitted, the current frame is used.

Return Values

Number of lines painted for the specified frame.

Use

Use in Form and Report components.

Description

The function $framedepth allows you to determine how many lines are needed to print a frame. The function cannot take into consideration any vertical expansion that might occur when the frame is printed at run time; the value returned is the number of lines that have been painted on the component.

When you add $totlines, $framedepth(HEADER), and $framedepth(TRAILER), the result is the full page depth, excluding top and bottom margins.

Note:  It is usually easier to set the Print Frame on Same Page property of an entity or named area frame.

Using $framedepth

The following example shows how a page feed can be produced when the depth of a frame is greater than the lines remaining on the page:

; entity : CUSTOMER
trigger getFocus
if ($lines < $framedepth(INVOICE))
   eject
endif
end ; getFocus

Related Topics