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

ReadRecords (32-bit only)

The ReadRecords method reads records in the report.

Syntax

object.ReadRecords

SelectPrinter

The SelectPrinter method selects a different printer for the report.

Syntax

object.SelectPrinter DriverName, PrinterName, PortName

Parameters

DriverName

String that contains the name of the printer driver for the selected printer. See

 

DriverName property of PrinterInfo Object (page 345) for more information.

 

 

PrinterName

String that contains the printer name for the selected printer. See PrinterName

 

property of PrinterInfo Object (page 345) for more information.

PortName

String that contains the port name for the port to which the selected printer is

 

attached. See PortName property of PrinterInfo Object (page 345) for more

 

information.

 

 

Report Object Events

ReadingRecords

The ReadingRecords event occurs when records are read (that is, when a report is previewed, printed, refreshed, etc.). Reading occurs at random intervals, so a different number of reading record events may occur each time the same report is previewed, printed, etc.

Syntax

Event ReadingRecords (ReadRecords As Long, RecordsSelected As Long, Cancelled As Boolean, Done As Boolean)

Crystal Report Engine Object Model for the Automation Server

355

Parameters

Cancelled

Specifies Boolean value indicating that record reading was cancelled.

 

 

Done

Specifies Boolean value indicating whether record reading is finished.

RecordsRead

Specifies the number of records read to process the report.

 

 

RecordsSelected

Specifies the number of records selected to appear in the report.

 

 

ReportName

Reserved for future use.

 

 

Remarks

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

Start

The Start event occurs when the report starts printing or previewing.

Syntax

Event Start (Destination As CRPrintingDestination, useDefault As Boolean)

Parameters

Destination

Specifies CRPrintingDestination (see table below) indicating what “destination” the

 

report will be printed to (that is, printer, window, exported, etc.).

 

 

 

 

Constant

Value

 

 

 

 

 

 

 

crFromQuery

4

 

crToExport

3

 

 

 

 

crToNoWhere

0

 

 

 

 

crToPrinter

2

 

 

 

 

crToWindow

1

 

 

useDefault

Specifies Boolean value indicating if default behavior should occur after user’s event

 

code has run (that is, should the report start to print or preview?).

 

 

 

Remarks

This event is enabled by using the StartStopEventEnabled 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

356

Stop

The Stop event that occurs when report stops printing/previewing.

Syntax

Event Stop (Destination As CRPrintingDestination,

Status As CRPrintingProgress)

Parameters

Destination

Specifies CRPrintingDestination (see table below) indicating what “destination” the

 

 

report will be printed to (that is, printer, window, exported, etc.).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Constant

 

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

crFromQuery

 

4

 

 

 

crToExport

 

3

 

 

 

 

 

 

 

 

 

crToNoWhere

 

0

 

 

 

 

 

 

 

 

 

crToPrinter

 

2

 

 

 

 

 

 

 

 

 

crToWindow

 

1

 

 

 

 

 

 

 

 

 

 

Status

Specifies CRPrintingProgress (see table below) indicating the progress of the report print

 

 

job (that is, in progress, halted, cancelled, etc.).

 

 

 

 

 

 

 

 

 

 

 

 

Constant

 

Value

 

 

 

 

 

 

 

 

 

 

 

 

crPrintingCancelled

 

5

 

 

 

 

 

 

 

crPrintingCompleted

 

3

 

 

 

 

 

 

 

crPrintingFailed

 

4

 

 

 

 

 

 

 

crPrintingHalted

 

6

 

 

crPrintingInProgress

 

2

 

 

 

 

 

 

 

crPrintingNotStarted

 

1

 

 

 

 

 

 

Remarks

This event is enabled using the StartStopEventEnabled 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

357

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