$totlines

Return the total number of lines available on the page for printing.

$totlines

Example: vLineNum = ($totlines - $lines)

Return Values

Values returned in $totlines
Value Meaning
0 Uniface is not printing ($printing = 0); $status is set to an empty string ("")
>0 Total number of lines available for printing, excluding the header and footer frames. Uniface is printing ($printing = 1)

Use

Use in Form and Report components.

Description

The $totlines function is a useful way of logging how a report is formatted for print. For example, you might want to warn users if their occurrence has spread over two pages. Another use for $totlines is to calculate the current line number.

Calculating the Current Line Number

The following example uses $totlines and $lines to calculate the current line number:

vLineNum = ($totlines - $lines)

Checking if Entity Fits on Page

The following example uses $totlines to check whether an entity can fit on a page, and prints a message if it cannot fit on the page:

trigger LeavePrinted 
  if (($totlines - $framedepth) < 0)
     putmess "%%$entname didn't fit on 1 page: see page %%$page."
  endif
end

Related Topics