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

DataFiles

DataFiles specifies the location of the database files or tables used in the report.

Syntax

[form.]Report.DataFiles(ArrayIndex)[= Location$]

Enter the file name and path of each database file or table in your report for which you want to change the location.

Use a separate line of code for each file for which you want to change the location.

The order of files in the array must conform to the order of files in the report. (You can use the Database|Set Location command to determine the order of files in the report.)

The first file in the report is array index (0), the second file is (1), etc.

For example, to change the location of the first and third files in a report (first.dbf and third.dbf) to the c:\new directory, use the following syntax:

CrystalReport1.DataFiles(0) = “c:\new\first.dbf”

CrystalReport1.DataFiles(2) = “c:\new\third.dbf”

Remarks

DataFiles is an array property that is available at runtime only.

Use this property if you want to run the report with files in different locations than specified in the report.

When using this property, you do not have to change the locations of all files in the report. Just make certain that the array index for each file you do change matches the position of that file in the report.

This property is cleared once the print job is printed. If you print a second time, the program reverts to the locations as originally specified in the report.

NOTE: If you are currently using the VBX control in your application, you will not be able to print individual subreports.

Data Type

Array of strings

Availability

Runtime

Related Report Engine Functions

PESetNthTableLocation, Volume 2, Chapter 1

Crystal ActiveX Control Reference

182

DataSource

DataSource specifies the Data Control from which the bound report will retrieve the data.

Remarks

This property is ignored if the ReportSource, Page 235, is set to 0.

The Data Control must exist on the form before this property can be set.

This property is only available at design time.

This property/method is available for subreports.

Data Type

Data Control object

Availability

Design Time

Destination

Destination specifies the destination to which your report is to be printed (Window, Printer, File or Mail).

Syntax

[form.]Report.Destination[= Destination%]

For example:

CrystalReport1.Destination = 0

«Sends the specified report to print to a window.»

Remarks

Select one of the following print destinations:

0 = Window (Sends the report to a preview window.)

1 = Printer (Sends the report to a printer.)

2 = File (Prints the report to a disk file for printing at a later time or for importing into other applications. If you select this property, you will also have to set the PrintFileName, Page 220, and the

PrintFileType, Page 223.)

Crystal ActiveX Control Reference

183

3 = E-mail via MAPI (Sends the report to another person on your network via MAPI e-mail (Microsoft Mail). The report is attached to the e-mail letter in the format specified by the PrintFileType, Page 223.)

4 = E-mail via VIM (Sends the report to another person on your network via VIM e-mail (cc:Mail). The report is attached to the e-mail letter in the format specified by the PrintFileType, Page 223.)

5 = To Notes (Sends the report to a Lotus Notes destination.)

6 = To Exchange Folder (Sends the report to a Microsoft Exchange folder).

This property/method is available for subreports.

Data Type

Integer (Enumerated)

Availability

Design Time; Runtime

Related Report Engine Functions

PEOutputToPrinter, Volume 2, Chapter 1

PEOutputToWindow, Volume 2, Chapter 1

PEExportTo, Volume 2, Chapter 1

DetailCopies

DetailCopies specifies the number of copies of each record in the Details section that the program is to print.

Syntax

[form.]Report.DetailCopies[= NumCopies%]

For example:

CrystalReport1.DetailCopies = 3

«Specifies that three (3) copies of each record in the details section are to be printed.»

Remarks

If DetailCopies is set to a value less than or equal to zero, the value is ignored and 1 copy of the Detail section of the report is printed.

This property/method is available for subreports.

NOTE: If you are currently using the VBX control in your application, you will not be able to print individual subreports.

Crystal ActiveX Control Reference

184

Data Type

Integer

Availability

Design Time; Runtime

Related Report Engine Functions

PESetNDetailCopies, Volume 2, Chapter 1

DialogParentHandle

DialogParentHandle specifies the handle of the parent window. The program uses this handle to determine the window within which it centers any dialog boxes that it displays (progress dialog boxes, parameter field prompt dialog boxes, etc.).

Syntax

[form.]Report.DialogParentHandle = [HWND]

For example:

CrystalReport1.DialogParentHandle = ParentHwnd

«Specifies the handle of the parent for all dialog boxes that the control will display.»

Remarks

Does not affect the placement of the preview window. Preview window placement is determined by the

WindowLeft, Page 252, WindowTop, Page 264, WindowHeight, Page 252, and WindowWidth, Page 265 properties.

This property/method is available for subreports.

Data Type

Long Integer

Availability

Runtime only

Related Report Engine Functions

PESetDialogParentWindow, Volume 2, Chapter 1

Crystal ActiveX Control Reference

185

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