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

Remarks

If the report being printed contains one or more group selection formulas, the value returned by RecordsPrinted may be significantly less than the value returned by RecordsSelected. Otherwise, this value should equal RecordsSelected, Page 232.

This property/method is available for subreports.

Data Type

Long

Availability

Runtime

Related Report Engine Functions

PEGetJobStatus, Volume 2, Chapter 1

RecordsRead

RecordsRead specifies the number of records actually processed.

Syntax

[form.]Report.RecordsRead

For example:

Read% = CrystalReport1.RecordsRead

«Fetches the number of records read and saves it in the Read variable.»

Remarks

If the Crystal Report Engine generates a SQL query to obtain data from a SQL database when the report is printed, RecordsRead will only return the number of records received by the Crystal Report Engine from the query. This value may be significantly smaller than the number of records actually in the SQL database table.

This property/method is available for subreports.

Data Type

Long

Crystal ActiveX Control Reference

231

Availability

Runtime

Related Report Engine Functions

PEGetJobStatus, Volume 2, Chapter 1

RecordsSelected

RecordsSelected specifies the number of records selected for inclusion in the report out of the total number of records read.

Syntax

[form.]Report.RecordsSelected

For example:

Selected& = CrystalReport1.RecordsSelected

«Fetches the number of records selected and saves it in the Selected variable.»

Remarks

RecordsSelected will return a value anywhere between zero and the value returned by RecordsRead, Page 231. The value returned by RecordsSelected depends on the queries and selection formulas set up in the report.

This property/method is available for subreports.

Data Type

Long

Availability

Runtime

Related Report Engine Functions

PEGetJobStatus, Volume 2, Chapter 1

ReportDisplayPage

ReportDisplayPage indicates which page of a multi-page report is currently being displayed in the preview window.

Syntax

[form.]Report.ReportDisplayPage

Crystal ActiveX Control Reference

232

For example:

Result% = CrystalReport1.ReportDisplayPage

«Fetches the number of the displayed page and stores it in the Result variable.»

Data Type

Integer

Availability

Runtime

Remarks

This property/method is available for subreports.

Related Report Engine Functions

PEGetJobStatus, Volume 2, Chapter 1

ReportFileName

ReportFileName specifies the name of the report to be printed.

Syntax

[form.]Report.ReportFileName[= ReportName$]

For example:

CrystalReport1.ReportFileName = “c:\crw\company.rpt”

«Prints the report named “company.rpt” that is located in the C:\CRW directory.»

Remarks

You can double-click this property or click the ellipsis (...) in the Properties box to call up the Choose Report File dialog box. In that dialog box, select the name and path of the report you want the program to print in response to a Crystal ActiveX Control event.

This property/method is available for subreports.

NOTE: If you want to specify the ReportFileName at runtime, make certain that you enclose it in quotes in your code.

Data Type

String

Crystal ActiveX Control Reference

233

Availability

Design Time; Runtime

Related Report Engine Functions

PEOpenPrintJob, Volume 2, Chapter 1

ReportLatestPage

ReportLatestPage specifies the last page printed in the specified report.

NOTE: ReportLatestPage will only contain the last page number after calling CrystalReport1.PageCount.

Syntax

[form.]Report.ReportLatestPage

For example:

Latest% = CrystalReport1.ReportLatestPage

«Fetches the number of the last page printed and stores it in the Latest variable.»

Data Type

Integer

Availability

Runtime

Remarks

This property/method is available for subreports.

Related Report Engine Functions

PEGetJobStatus, Volume 2, Chapter 1

Crystal ActiveX Control Reference

234

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