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

Version Properties

Version DLL property, Page 681

Version Engine property, Page 681

Version Major property, Page 682

Version Minor property, Page 682

Version Windows property, Page 683

Version Methods

Version Clear method, Page 683

Version CopyFrom method, Page 684

Version Create method, Page 684

Version Retrieve method, Page 685

WindowButtonBar

Declaration

property WindowButtonBar: TCrpeWindowButtonBar;

Type

TCrpeWindowButtonBar = class(TPersistent)

Description

The WindowButtonBar object contains 13 properties that relate to the Button Bar that appears on the Crystal Reports Preview Window.

The Visible property determines if the Button Bar is visible or not. This is the only property that can be used with Crystal Reports 5.0. The rest of the properties apply to Crystal 6.0 and higher.

Crystal Reports 6.0 introduced 6 new buttons and one new option to the Button Bar/Preview Window and provided the capability of specifying which of the buttons should appear. The new features are:

AllowDrillDown

CancelBtn

CloseBtn

GroupTree

PrintSetup

RefreshBtn

SearchBtn

VCL Reference

119

If the Preview Window is made a Child of a Delphi Form by attaching the WindowParentHandle property to the Form's Handle. A custom button bar can then be designed; it may be desirable to turn off the Crystal Button Bar by setting the Visible property to False. Bear in mind, though, that not all the buttons currently on the Crystal Reports Preview Window can be mimicked in code.

The following buttons can be simulated in code:

CancelBtn - CancelJob

CloseBtn - CloseWindow

ExportBtn - ExportWindow

NavigationCtls - Pages

PrintBtn - PrintOptions.PromptForOptions and PrintWindow

ProgressCtls - Records

ZoomCtl - WindowZoom

The following buttons cannot be reproduced in code yet:

AllowDrillDown

GroupTree

PrintSetupBtn

RefreshBtn

SearchBtn

The PrintSetupBtn can be partly reproduced by calling a PrinterSetup dialog and then using the GetCurrent method of the Printer object (or just using the ShowPrintDlg method of the Printer object), but this will not affect the current Preview Window or the PrintWindow method, as it will if the PrinterSetup button is called from the Crystal Button Bar.

WindowButtonBar Example

This code example sets the WindowButtonBar properties so that Drill-Down is possible and the Cancel button is hidden:

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

with Crpe1.WindowButtonBar do begin

Visible := True; AllowDrillDown := True; CancelBtn := False;

end; Crpe1.Execute;

VCL Reference

120

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