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

SendDlgItemMessage(hDlg,1,WM_LBUTTONDOWN,0,0); {Send a Button Up to the OK button of the Dialog} SendDlgItemMessage(hDlg,1,WM_LBUTTONUP,0,0);

end; end;

NOTE: The above code was tested on Windows95 and is offered as a possible work-around. It is not guaranteed to work on all platforms and will probably need to be modified for WindowsNT. If the PrintToFile dialog box differs the edit field ID number for the filename will also probably be different. Don't attempt this unless you have a reasonable knowledge of Windows API calls, or avoid the problem by upgrading to Crystal Reports 7.

Printer Properties

Printer Driver property, Page 488

Printer Mode property, Page 490

Printer Name Property, Page 491

Printer Orientation Property, Page 494

Printer PMode Property, Page 494

Printer Port Property, Page 495

Printer PreserveRptSettings property, Page 498

Printer ShowDialog property, Page 500

Printer Methods

Printer Clear Method, Page 501

Printer CopyFrom Method, Page 502

Printer Create Method, Page 502

Printer GetCurrent Method, Page 503

Printer Retrieve Method, Page 504

Printer Send Method, Page 504

Printer ShowPrintDlg Method, Page 505

PrintOptions

Declaration

property PrintOptions: TCrpePrintOptions;

Type

TCrpePrintOptions = class(TPersistent)

VCL Reference

81

Description

The PrintOptions object, along with the Printer object, contains the properties that apply when setting the Output property to go to Printer:

The Collation property refers to the printing of multiple copies of a Report and to whether they will print out as page 1,2,3, etc. or they will print out as 1,1,2,2,3,3, etc.

The Copies property specifies the number of copies of the Report.

The StartPage property specifies the first page that will be printed.

The StopPage property specifies the last page that will be printed.

The OutputFileName property specifies a filename that the Report will be printed to (optional).

The Retrieve method can be used to get the current Report values for these properties.

The Clear method can be used to set them back to default.

The PromptForOptions property can be used to bring up a prompt dialog box to allow the user to select the values for the PrintOptions properties.

PrintOptions Example

This code example changes the PrintOption properties to print out two copies of pages 2 & 3 from the Report, collated:

Crpe1.ReportName := 'MyReport.rpt'; Crpe1.Output := toPrinter;

with Crpe1.PrintOptions do begin

Collation := Collated; Copies := 2;

StartPage := 2;

StopPage := 3; end; Crpe1.Execute;

PrintOptions Properties

PrintOptions Collation property, Page 506

PrintOptions Copies property, Page 507

PrintOptions OutputFileName property, Page 508

PrintOptions PromptForOptions property, Page 508

PrintOptions StartPage property, Page 510

PrintOptions StopPage property, Page 510

VCL Reference

82

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