Detects whether a report is being printed or is in preview mode.
Return Value
Character data type. Returns the current status of the report as follows.
|
Value
|
Description
|
|
0
|
There is no active report.
|
|
1
|
Report is in Preview Mode
|
|
2
|
Report is being sent as output (such as a printer or file).
|
Remarks
Example
The following example displays how SYS(2040) can be used to suppress the _PAGETOTAL system variable when the report is in Preview Mode.
| | Copy Code |
|---|
"Page: " + TRANS(_PAGENO) + ;
IIF( SYS(2040) = "1", "", " of " + TRANS(_PAGETOTAL)) |
See Also