Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
191
Добавлен:
11.05.2015
Размер:
4.96 Mб
Скачать

Window Object Properties

Property

Description

Read/Write

 

 

 

 

 

 

Application

Returns a reference to the Application Object (page 290), that

Read only

 

this object is associated with.

 

 

 

 

ControlsVisible

Returns/Sets Boolean value indicating if window controls

Read/Write

 

are visible in the preview window.

 

Parent

Reference to the Parent object Report Object (page 349)).

Read only

 

 

 

Report

Reference to Report Object (page 349).

Read only

 

 

 

Views

Returns Views Collection (page 379), a collection of views in

Read only

 

the window.

 

WindowHandle

Returns the handle of the window.

Read only

 

 

 

Window Object Methods

Close

The Close method closes the window, and consequently, all views in the window.

Syntax

object.Close

Window Object Events

ActivatePrintWindow

The ActivatePrintWindow event occurs when the print window is activated (that is, received focus from another window).

Syntax

Event ActivatePrintWindow ()

Remarks

This event is enabled by using the ActivatePrintWindowEventEnabled property of the EventInfo Object (32-bit only), Page 310, obtained through the EventInfo property of the Report Object, Page 349. For more information, see Object Model Events, Page 283.

Crystal Report Engine Object Model for the Automation Server

380

CancelButtonClicked

The CancelButtonClicked event occurs when the Cancel button is clicked.

Syntax

Event CancelButtonClicked (useDefault As Boolean)

Parameter

useDefault

Specifies Boolean value indicating whether the default settings should be used. Assign

 

useDefault = FALSE if not using default behavior defined in CPEAUT (that is, if you do

 

not want the cancel button to cancel moving to the last page or processing the report).

 

 

Remarks

Before enabling this event, the HasCancelButton property of the PrintWindowOptions Object, Page 347, must be set to TRUE. This event is enabled by using the PrintWindowButtonEnabled property of the EventInfo Object (32-bit only), Page 310, obtained through the EventInfo property of the Report Object, Page 349. For more information, see Object Model Events, Page 283.

CloseButtonClicked

The CloseButtonClicked event occurs when the Close button is clicked, either to close a view or the entire preview window itself.

Syntax

Event CloseButtonClicked (ViewIndex As Integer, useDefault As Boolean)

Parameters

ViewIndex

Specifies the index of the view that is to be closed.

useDefault

Specifies Boolean value indicating whether the default settings should be used. Assign

 

useDefault = FALSE if not using default behavior defined in CPEAUT (that is, if you do

 

not want the view/preview window to close).

 

 

Remarks

 

Before enabling this event, the HasCloseButton property of the PrintWindowOptions Object, Page 347, must be set to TRUE. This event is enabled by using the PrintWindowButtonEnabled property of the EventInfo Object (32-bit only), Page 310, obtained through the EventInfo property of the Report Object, Page 349. For more information, see Object Model Events, Page 283.

Crystal Report Engine Object Model for the Automation Server

381

ClosePrintWindow

The ClosePrintWindow event occurs when the print window is closed.

Syntax

Event ClosePrintWindow (useDefault As Boolean)

Parameter

useDefault

Specifies Boolean value indicating whether the default settings should be used. Assign

 

useDefault = FALSE if not using default behavior defined in CPEAUT (that is, if you do

 

not want the print window to close).

 

 

Remarks

This event is enabled by using the ClosePrintWindowEventEnabled property of the EventInfo Object (32-bit only), Page 310, obtained through the EventInfo property of the Report Object, Page 349. For more information, see Object Model Events, Page 283.

DeactivatePrintWindow

The DeactivatePrintWindow event occurs when the print window is deactivated (that is, when any other window takes the focus from the print window).

Syntax

Event DeactivatePrintWindow ()

Remarks

This event is enabled by using the ActivatePrintWindowEventEnabled property of the EventInfo Object (32-bit only), Page 310, obtained through the EventInfo property of the Report Object, Page 349. For more information, see Object Model Events, Page 283.

DrillOnDetail

The DrillOnDetail event occurs when you drill down on a field in the Details area of the report.

Syntax

Event DrillOnDetail (FieldValues, SelectedFieldIndex As Long, useDefault As Boolean)

Crystal Report Engine Object Model for the Automation Server

382

Parameters

FieldValues

Specifies an array of FieldValue objects (see FieldValue Object (32-bit only), Page

 

316). Each object contains information about a single field for the Detail record that

 

was drilled down on. FieldValues may contain database field values, formula field

 

values and summary field values, and group name field values of the group that

 

the record belongs to.

 

 

SelectedFieldIndex

Specifies the selected field index in the array that points to the actual FieldValue. If

 

no field is selected, 0 is returned.

 

 

useDefault

Specifies Boolean value indicating whether the default settings should be used.

 

Assign useDefault = FALSE if not using default behavior defined in CPEAUT (that

 

is, if you do not want drill down to occur).

ReportName

Reserved for future use.

 

 

Remarks

Before enabling this event, the CanDrillDown property of the PrintWindowOptions Object, Page 347, must be set to TRUE. For more information, see Object Model Events, Page 283.

DrillOnGroup

The DrillOnGroup event occurs when drilling down (double-clicking) on a group field in the preview window.

Syntax

Event DrillOnGroup (GroupNameList, DrillType As CRDrillType, useDefault As Boolean)

Parameters

GroupNameList

Specifies an array indicating the path to the group that was drilled down on

 

(separated by “/”).

 

 

 

 

DrillType

Specifies CRDrillType (see table below) indicating what type of drilldown

 

occurred.

 

 

 

 

 

 

 

 

Constant

Value

 

 

 

 

 

 

 

crDrillOnGraph

2

 

 

 

 

crDrillOnGroup

0

 

 

 

 

crDrillOnGroupTree

1

 

 

 

Crystal Report Engine Object Model for the Automation Server

383

Соседние файлы в папке crystal