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

Export Report

This button exports the Report. You will be prompted for the Export options. This is accomplished by setting the PromptForOptions property of the Export object to True.

Window Buttons

These buttons are on the second row of the Design Controls dialog box and control the closing, paging and zoom level of the Preview Window of a Report run from the Design Controls dialog box. These controls are especially useful when the WindowParent property has been set to a Form or Panel, in which case the Preview Window controls will not be accessible at design-time.

Close Window

This button can be used to close the currently open Preview Window.

First Page

This button can be used to go to the first page of the currently open Preview Window.

Previous Page

This button can be used to go to the previous page of the currently open Preview Window.

Next Page

This button can be used to go to the next page of the currently open Preview Window.

Last Page

This button can be used to go to the last page of the currently open Preview Window.

Cancel

This button can be used to cancel the processing of a Report after the Preview, Print, or Export buttons have been clicked. It is equivalent to calling CancelJob in code.

Zoom

This button changes the Zoom level of the currently open Preview Window.

DetailCopies

Declaration

property DetailCopies: integer;

Description

The DetailCopies property determines how many times the Details band of the Report will print out. This is normally used for Mailing Label-style Reports, where more than one label may be desired for each customer in a list. This property can also be applied to Subreports.

VCL Reference

19

DetailCopies Example

This code sample sets the DetailCopies to 2. The Details area of the Report will be printed out twice per record.

Crpe1.ReportName := 'C:\Company.rpt';

Crpe1.DetailCopies := 2;

Crpe1.Output := toPrinter;

Crpe1.Execute;

DialogParent

Declaration

property DialogParent: TCrWinControl;

Type

TCrWinControl = TWinControl;

Description

DialogParent is a run-time only property that causes the Preview Window dialogs to have the same Z-Order as the Parent Form they are attached to. Z-Order affects the order in which windows are drawn on the screen, so in this case, the Preview Window dialog boxes would be brought to the front of the screen when the Parent Form is brought to the front. In this situation, care must be taken not to close the Parent Form while the Crystal Preview Window is writing to one of the dialog boxes.

To set DialogParent, simply assign it the name of the Form or Panel desired.

DialogParent Example

In this example. the Preview Window dialogs will have the same Z-Order as Form1:

Crpe1.ReportName := 'C:\Company.rpt';

Crpe1.DialogParent := Form1;

Crpe1.Output := toWindow;

Crpe1.Execute;

VCL Reference

20

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