Skip to content

IsViewerActive - cWinReport2

Returns true of the Winprint2 viewer is actve

Type: Function
Return Data Type: Boolean

Syntax

Function IsViewerActive Returns Boolean

Call Example

Get IsViewerActive to BooleanVariable

Description

The IsViewerActive function returns true if the WinPrint2 report is active (i.e., it is paged). This can be used to control the report viewer within a program.

// if report viewer is active clear the report (which will also close the viewer)
Get IsViewerActive of oReport to bActive
If bActive begin
    Send DFClearDoc of oReport
end

Note that an active viewer may not be showing a view of the current report. This viewer is global. If the viewer is active, any report in the application could have generated this report and any report will return True for this function.

See Also

DocumentStatus

Return Value

Returns true, if report viewer is active