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

Property

Description

Read/Write

Restriction in event handler

 

 

 

 

 

 

 

 

SummaryFields

Returns

Read only

None

 

SummaryFieldDefinitions

 

 

 

Collection, Page 123, for group

 

 

 

and report summaries (cross-

 

 

 

tab summaries not available

 

 

 

using this property).

 

 

TopMargin

Returns or sets the page top

Read/Write

Can be written only when

 

margin.

 

formatting idle.

 

 

 

 

TranslateDosMemos

Returns or sets the report

Read/Write

Can be written only when

 

option that indicates whether

 

formatting idle.

 

to translate DOS memos.

 

 

 

 

 

 

TranslateDosStrings

Returns or sets the report

Read/Write

Can be written only when

 

option that indicates whether

 

formatting idle.

 

to translate DOS strings.

 

 

UseIndexForSpeed

Returns or sets the report

Read/Write

Can be written only when

 

option that indicates whether

 

formatting idle.

 

to use indexes to speed the

 

 

 

record selection process.

 

 

VerifyOnEveryPrint

Returns or sets the report

Read/Write

Can be written only when

 

option that indicates whether

 

formatting idle.

 

to verify the database every

 

 

 

time the report is printed.

 

 

Report Object Methods

AddGroup Method (Report Object), Page 99

DiscardSavedData Method (Report Object), Page 100

Export Method (Report Object), Page 100

GetNextRows Method (Report Object), Page 101

OpenSubreport Method (Report Object), Page 101

PrintOut Method (Report Object), Page 102

ReadRecords Method (Report Object), Page 102

Save Method (Report Object), Page 102

SelectPrinter Method (Report Object), Page 103

SetDialogParentWindow Method (Report Object), Page 103

Report Designer Component Object Model

98

AddGroup Method (Report Object)

The AddGroup Method adds a group to the report. ConditionField indicates the field for grouping, Condition indicates a change in a field value that generates a grouping, and SortDirection specifies the direction in which groups are sorted.

Syntax

Sub AddGroup(GroupNumber As Integer, pConditionField As Object, condition As CRGroupCondition, SortDirection As CRSortDirection)

Parameters

Parameter

Description

 

 

 

 

GroupNumber

Specifies the number of the group to be added (the position of the group in relation

 

to existing groups). For example, to add a group to the first position, set GroupN to

 

1.

 

 

pConditionField

Specifies the field to be grouped. The field can be a database field definition object

 

or the field name.

 

 

condition

Specifies CRGroupCondition (see table below) indicating the grouping condition

 

(that is, group on any value).

 

 

Constant

Value

 

 

 

 

crGCAnnually

7

 

 

crGCAnyValue

14

 

 

crGCBiweekly

2

 

 

crGCDaily

0

crGCEveryNo

11

crGCEveryYes

10

 

 

crGCMonthly

4

 

 

crGCNextIsNo

13

 

 

crGCNextIsYes

12

crGCQuarterly

5

 

 

crGCSemiAnnually

6

 

 

crGCSemimonthly

3

 

 

crGCToNo

9

crGCToNo

8

 

 

crGCWeekly

1

 

 

Report Designer Component Object Model

99

SortDirection

Specifies CRSortDirection (see table below) indicating the sort direction for the

 

group (that is, ascending, descending).

 

 

 

 

 

 

 

Constant

Value

 

 

 

 

 

 

 

crAscendingOrder

0

 

 

 

 

crDescendingOrder

1

 

 

 

 

crOriginalOrder

2

 

 

 

 

crSpecifiedOrder

3

 

 

 

CancelPrinting Method (Report Object)

The CancelPrinting method cancels the printing of a report.

Syntax

object.CancelPrinting

DiscardSavedData Method (Report Object)

The DiscardSavedData method discards any saved data with the report before previewing. This method can be invoked only when in formatting idle mode.

Syntax

object.DiscardSavedData

Export Method (Report Object)

The Export method exports reports to a format and destination specified with ExportOptions Object (page 41).

Syntax

object.Export PromptUser

Report Designer Component Object Model

100

Parameters

Parameter

Description

 

 

 

 

PromptUser

Specifies Boolean value indicating if user should be prompted for export options (if you

(Optional)

don’t want to prompt). All necessary export options have to be set or prompt will be

 

used whether set this parameter is set to TRUE or FALSE.

 

 

GetNextRows Method (Report Object)

The GetNextRows method returns the specified rowset.

Syntax

Function GetNextRows(startRowN As Long, pRowN As Long)

Parameters

Parameter

Description

 

 

 

 

startRowN

Specifies the row number to start the rowset on.

 

 

RowN

Specifies the number of rows to return to the rowset.

 

 

Returns

Returns the specified rowset.

OpenSubreport Method (Report Object)

The OpenSubreport method opens a subreport contained in the report and returns a Report Object corresponding to the named subreport.

Syntax

Function OpenSubreport(pSubreportName As String) As Report

Parameter

Parameter Description

SubreportName

Specifies the file name of the subreport to be opened.

Report Designer Component Object Model

101

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