$occdepth

Return the depth of the occurrence in the layout.

$occdepth { (Entity) }

Parameters

Parameters
Parameter Data Type Description
Entity String Entity name. If omitted, the current entity is used.

Return Values

Number of lines drawn for the specified occurrence.

Use

Allowed in Form, Report, and Service components, but not in self-contained Services.

Description

The $occdepth allows you to test how many lines are needed to print an occurrence of the specified entity. This function cannot take into consideration any vertical expansion that might occur when the frame is printed at run time.

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

Using $occdepth

The following example shows how to use $occdepth to determine whether there is enough space left on a page to print an occurrence:

; Entity
trigger getFocus
if ($lines < $occdepth)
   eject
endif
end ; getFocus

Related Topics