$printing

Return a status indicating whether the current component is printing.

$printing

Example: if ($printing = 1) ...

Return Values

  • 1, if Uniface is printing.
  • 0, if Uniface is not printing.

Use

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

Description

The $printing function allows you to test whether Uniface is printing the current component. This can be particularly useful in the getFocus trigger. For example, you may want to use a form both for report purposes and for interactive data entry or administration. The code you would use during a print process is probably very different from the code you would use for an interactive session.

Checking Print Status

The following example shows how to display a message informing the user which page is currently being printed:

; check print status with $printing

if ($printing = 1)
   message "Printing %%$page%%%"
endif

Related Topics