Skip to content

DFGetEnablePrintFromPreview - cWinReport2

Determines is printing is allowed within the WinPrint2 report viewer

Type: Function
Return Data Type: Boolean

Syntax

Function DFGetEnablePrintFromPreview Returns Boolean

Call Example

Get DFGetEnablePrintFromPreview to BooleanVariable

Description

DFGetEnablePrintFromPreview can be used to determine if printing is allowed from within the report viewer. When a report is started, the report object always enables printing from the viewer and, therefore, this function usually returns true. This capability may be disabled by sending the DFSetEnablePrintFromPreview.

When disabled, the print button in the viewer will appear as a disabled button.

The DFGet and DFSet messages and the WinPrint2 global object.

All of the cWinReport2 DFGet... and DFSet... messages set the state of the global WinPrint2 report object (the WinPrint2 report engine). It is not setting the state of the report object (i.e., these methods are not setting report object properties). Since many reports in an application will use the global WinPrint2 object, you must set and get the state of this object when your report object has control of it. The best place to do this is inside of the Starting_main_report event.

Return Value

Returns True if printing is allowed from the viewer, false if printing is not allowed