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

Property

Description

Read/Write

 

 

 

 

 

 

HelpContextID

Specifies the default Help file context ID for an object.

Read/Write

 

 

 

Index

Returns or sets the number identifying a control in a

Read-only

 

control array.

 

 

 

 

IsBusy

Returns the status of a control.

Read-only

 

 

 

Left

Returns or sets the distance between the internal left

Read/Write

 

edge of an object and the left edge of its container.

 

Name

Returns the name used in code to identify an object.

Read-only

 

 

 

Object

Returns an object in a control.

Read-only

 

 

 

Parent

Returns the parent object on which this object is

Read-only

 

located.

 

ReportSource

Returns or sets the ReportChannel.

Read/Write

 

 

 

TabIndex

Returns or sets the tab order of an object within its

Read/Write

 

parent form.

 

 

 

 

TabStop

Returns or sets a value indicating whether a user can

Read/Write

 

use the TAB key to give the focus to an object.

 

Tag

Stores any extra data needed for your program.

Read/Write

 

 

 

ToolTipText

Returns or sets the text displayed when the mouse is

Read/Write

 

paused over the control.

 

 

 

 

Top

Returns or sets the distance between the internal top

Read/Write

 

edge of an object and the top edge of its container.

 

 

 

 

TrackCursorInfo

Returns a CRVTrackCursorInfo object.

Read-only

 

 

 

ViewCount

ViewCount returns the current number of views (tabs).

Read only

 

 

 

Visible

Returns or sets a value that determines whether an

Read/Write

 

object is visible or hidden.

 

 

 

 

WhatsThisHelpID

Returns or sets an associated context number for an

Read/Write

 

object.

 

 

 

 

Width

Returns or sets the width of an object.

Read/Write

CRViewer Object Methods

ActivateView

The ActivateView method activates a particular view by 1-based index.

Syntax

object.ActivateView(Index)

Smart Viewer Object Models

145

Parameter

Parameter Description

Index

The index of the view that you want to activate.

AddView

The AddView method is used to add a new view tab to the Viewer.

Syntax

object.AddView(GroupPath)

Parameter

Parameter

Description

 

 

 

 

GroupPath

GroupPath can be a colon-delimited string (Country:State:City) or a safe array of strings.

 

It indicates the group for which you want to add a view to the Smart Viewer window.

CloseView

The CloseView method closes the view.

Syntax

object.CloseView(Index)

Parameter

Parameter Description

Index

The index of the view that you want to close.

Drag Method

The Drag method is a Visual Basic method that begins, ends, or cancels a drag operation on a control. This method is not valid for the Smart Viewer. Refer to Visual Basic documentation for complete information.

Syntax

object.Drag([Action])

Smart Viewer Object Models

146

ExportReport

The ExportReport method exports the report to a file.

Syntax

Sub ExportReport(fileName As String, format, reserved)

Parameters

Parameter

Description

 

 

 

 

fileName

Specifies the name of the exported file.

format

Specifies the format of the exported file.

 

 

reserved

Reserved for future use.

 

 

GetCurrentPageNumber

The GetCurrentPageNumber method returns the page number of the report being viewed.

Syntax

object.GetCurrentPageNumber()

GetViewPath

The GetViewPath method returns the path to the current view, given the 1-based index number of the view. Path contains a safe array of strings. Views refer to the main Preview Tab and drill down tabs that appear in the Smart Viewer as the user interacts with the report.

Syntax

object.GetViewPath(Index As Integer)

Parameter

Parameter

Description

 

 

 

 

Index

An integer referring to the view displayed in the Smart Viewer that the path is returned

 

for.

 

 

Smart Viewer Object Models

147

Example

Use the following code as an example of how to use GetViewPath.

Dim vPath As Variant

Dim vString As String Dim x As Integer

Dim y As Integer

Dim counter As Integer

vPath = CRViewer1.GetViewPath(userEnteredInteger) x = Lbound(vPath)

y = Ubound(vPath) For counter = x To y

If vString <> “” Then vString = vString & “:”

End If

vString = vString & vPath(counter) Next counter

ViewPathName.Caption = “View path is: “ & vString

Move Method

The Move method changes the position of the Smart Viewer on the Form.

Syntax

object.Move(Left As Single, [Top], [Width], [Height])

Parameters

Parameter

Description

 

 

 

 

Left

The distance between the left side of the Form and the left side of the Smart Viewer.

 

 

Top

The distance between the top of the Form and the top of the Smart Viewer.

 

 

Width

The width of the Smart Viewer.

 

 

Height

The height of the Smart Viewer.

PrintReport

The PrintReport method initiates printing of the report currently displayed in the Smart Viewer.

Syntax

object.PrintReport()

Smart Viewer Object Models

148

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