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

PrintingStatus Object Properties

Property

Description

Read/Write

Restriction in

event handler

 

 

 

 

 

 

 

 

 

 

 

NumberOfPages

Gets report page number.

Read only

None

 

 

 

 

NumberOfRecordPrinted

Returns the number of records printed.

Read only

None

 

 

 

 

NumberOfRecordRead

Returns the number of records read.

Read only

None

NumberOfRecordSelected

Returns the number of records selected.

Read only

None

 

 

 

 

Parent

Returns the parent of PrintingStatus

Read only

None

 

(Report Object).

 

 

 

 

 

 

Progress

Returns the printing progress.

Read only

None

 

 

 

 

Report Object

A report corresponds to a print job in the Crystal Report Engine. When the report object is destroyed, or goes out of focus, it closes the print job. It holds on to Application Object (page 18). When a Report Object get destroyed, it releases the application.

Access to the Report Object is dependent on the object variable you create. If the object variable goes out of scope, you will lose access to the Report Object and, therefore, the report. You may want to declare your Report Object variable as Global.

Report Object Properties

Property

Description

Read/Write

Restriction in event handler

 

 

 

 

 

 

 

 

Application

Returns a reference to the

Read only

 

 

Application Object (page 18),

 

 

 

this object is associated with.

 

 

 

 

 

 

ApplicationName

Returns or sets the application

Read/Write

 

 

name.

 

 

Report Designer Component Object Model

93

Property

Description

Read/Write

Restriction in event handler

 

 

 

 

 

 

 

 

Areas

Returns Areas Collection (page

Read only

None

 

24), a collection of all the areas

 

 

 

in the report which can be

 

 

 

indexed by a number or by a

 

 

 

string, such as “RH”, “GF1”.

 

 

 

The areas are in the same order

 

 

 

as on the Seagate Crystal

 

 

 

Reports Design Tab. For

 

 

 

Example: RH, PH, GH1,...GHn,

 

 

 

D, GFn,...GF1, RF, PF. The

 

 

 

abbreviations for areas are case

 

 

 

sensitive.

 

 

 

 

 

 

BottomMargin

Returns or sets the page

Read/Write

Can be written only when

 

bottom margin.

 

formatting idle.

CanPerform-

Checks whether the report can

Read only

 

GroupingOnServer

perform grouping on the

 

 

 

server.

 

 

 

 

 

 

CaseInsensitiveSQL

Returns or sets the report

Read/Write

Can be written only when

Data

option that indicates whether

 

formatting idle.

 

the SQL data used in the report

 

 

 

becomes case sensitive.

 

 

 

 

 

 

ConvertDateTime-

Returns or sets the report

Read/Write

Can be written only when

Type

option that specifies the format

 

formatting idle.

 

to be converted for date/time

 

 

 

fields.

 

 

 

 

 

 

ConvertNullFieldTo

Returns or sets the report

Read/Write

Can be written only when

Default

option that indicates whether

 

formatting idle.

 

to convert any null values to

 

 

 

the database field default.

 

 

 

 

 

 

Database

Returns the Database Object

Read only

None

 

(page 30), which represents the

 

 

 

database used in the report.

 

 

 

 

 

 

DisplayProgress

Enable or disable the progress

Read/Write

Can be written only when

Dialog

dialog.

 

formatting idle.

DriverName

Returns the driver name used

Read/Write

None

 

by the current printer. Returns

 

 

 

an empty string if default port

 

 

 

is used.

 

 

Report Designer Component Object Model

94

Property

Description

Read/Write

Restriction in event handler

 

 

 

 

 

 

 

 

DriverName

Returns the driver name used

Read/Write

None

 

by the current printer. Returns

 

 

 

an empty string if default port

 

 

 

is used.

 

 

 

 

 

 

EnableParameter

Enable or disable prompting

Read/Write

Can be written only when

Prompting

for parameter fields.

 

formatting idle.

ExportOptions

Returns ExportOptions Object

Read only

None

 

(page 41).

 

 

 

 

 

 

FormulaFields

Returns

Read only

None

 

FormulaFieldDefinitions

 

 

 

Collection, Page 53, a collection

 

 

 

of all the named

 

 

 

FormulaFieldDefinitions

 

 

 

defined in the Report.

 

 

GroupNameFields

Returns a collection of all the

Read only

None

 

group name fields defined in

 

 

 

the report.

 

 

 

 

 

 

GroupSelection

Returns/Sets the group

Read/Write

Can be written only when

Formula

selection formula.

 

formatting idle.

 

 

 

 

GroupSortFields

Gets group sort field collection.

Read only

None

 

 

 

 

HasSavedData

Returns Boolean value

Read only

None

 

indicating whether report

 

 

 

includes saved data.

 

 

 

 

 

 

KeywordsInReport

Returns or sets the keywords

Read/Write

None

 

in the report.

 

 

 

 

 

 

Kind

Returns crReportKind (see

Read only

None

 

table below) that specifies

 

 

 

what “kind” of object.

 

 

 

 

 

 

 

 

 

 

 

Constant

Value

 

 

 

 

 

 

 

 

 

 

crColumnarReport

1

 

 

 

 

 

 

crLabelReport

2

 

 

 

 

 

 

crMulColumnReport

3

 

 

 

 

 

Property

Description

Read/Write

Restriction in event handler

 

 

 

 

 

 

 

 

LeftMargin

Returns or sets the page left

Read/Write

Can be written only when

 

margin.

 

formatting idle.

 

 

 

 

Report Designer Component Object Model

95

Property

Description

Read/Write

Restriction in event handler

 

 

 

 

 

 

 

 

MorePrintEngine

Returns or sets the report

Read/Write

Can be written only when

ErrorMessages

option that indicates whether

 

formatting idle.

 

to pop up database error

 

 

 

dialogs during printing when a

 

 

 

Report Engine error occurs.

 

 

 

 

 

 

NumberOfGroup

Returns the number of groups

Read only

None

 

in the report.

 

 

 

 

 

 

PageEngine

Returns the PageEngine object.

Read only

None

 

 

 

 

PaperOrientation

Returns or sets the current

Read/Write

Can be written only when

 

printer paper orientation. For

 

formatting idle.

 

the default printer,

 

 

 

crDefaultPaperOrientation is

 

 

 

returned.

 

 

 

 

 

 

PaperSize

Returns or sets the current

Read/Write

Can be read or written only

 

printer paper size. For the

 

when formatting idle.

 

default printer,

 

 

 

crDefaultPaperSize is returned.

 

 

 

 

 

 

ParameterFields

Returns

Read only

None

 

ParameterFieldDefinitions

 

 

 

Collection, Page 92, a collection

 

 

 

of all the

 

 

 

ParameterFieldDefinitions

 

 

 

defined in the report. This

 

 

 

property will return parameter

 

 

 

field found in the main report

 

 

 

as well as any subreports

 

 

 

included in the report (i.e., if

 

 

 

the main report has 3

 

 

 

parameters and a subreport

 

 

 

included within the report has

 

 

 

an additional 2 parameters, the

 

 

 

number of parameter fields in

 

 

 

the collection returned by

 

 

 

Report.ParameterFields would

 

 

 

be 5.

 

 

 

 

 

 

Parent

Reference to the Parent object

Read only

None

 

(Application Object (page 18)).

 

 

 

 

 

 

PerformGrouping

Gets or sets performing

Read/Write

Can be written only when

OnServer

grouping on server option.

 

formatting idle.

 

 

 

 

Report Designer Component Object Model

96

Property

Description

Read/Write

Restriction in event handler

 

 

 

 

 

 

 

 

PortName

Returns the port name used by

Read only

None

 

the current printer. Returns

 

 

 

and empty string if the default

 

 

 

port is used.

 

 

 

 

 

 

PrintDate

Returns/Sets the print date for

Read/Write

Can be written only when

 

the report. By default, the

 

formatting idle.

 

current date will be used.

 

 

 

 

 

 

PrinterName

Returns the current printer

Read only

None

 

name. Returns an empty string

 

 

 

if the default printer is used.

 

 

PrintingStatus

Returns PrintingStatus Object

Read only

None

 

(page 92).

 

 

 

 

 

 

RecordSelection

Returns/Sets record selection

Read/Write

Can be written only when

Formula

formula.

 

formatting idle.

RecordSortFields

Returns SortFields Collection,

Read only

None

 

Page 111, a collection of record

 

 

 

sort fields.

 

 

 

 

 

 

ReportAuthor

Returns or sets the report

Read/Write

None

 

author.

 

 

 

 

 

 

ReportComments

Returns or sets report

Read/Write

None

 

comments.

 

 

 

 

 

 

ReportSubject

Returns or sets the report

Read/Write

None

 

subject.

 

 

ReportTemplate

Returns or sets the report

Read/Write

None

 

template.

 

 

 

 

 

 

ReportTitle

Returns or sets the report title.

Read/Write

Can be written only when

 

 

 

formatting idle.

RightMargin

Returns or sets the page right

Read/Write

Can be written only when

 

margin.

 

formatting idle.

 

 

 

 

RunningTotalFields

Gets running total field

Read only

 

 

collection.

 

 

Sections

Returns SortFields Collection,

Read only

None

 

Page 111, a collection of all the

 

 

 

sections in the report.

 

 

 

 

 

 

SQLExpression

Gets SQL expression field

Read only

None

Fields

collection.

 

 

 

 

 

 

SQLQueryString

Gets or sets SQL query string.

Read only

None

 

 

 

 

Report Designer Component Object Model

97

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