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

Creating a User-Defined Progress Dialog

The ProgressDialog can be replaced with a User-Defined dialog by setting ProgressDialog property to False and creating a dialog that displays the values of the Records object after the Report has been started (Execute was called).

Step 1 : Create a Dialog form with a TTimer component and 3 labels.

Step 2 : In the OnCreate Event, enable the TTimer.

procedure TForm1.FormCreate(Sender: TObject); begin

Timer1.Enabled := True; end;

Step 3 : In the OnShow Event, SetFocus to the Form (or ShowModal, or set FormStyle to AlwaysOnTop).

procedure TForm1.FormShow(Sender: TObject); begin

Form1.SetFocus; end;

Step 4 : In the Timer's OnTimer Event, update the display.

procedure TfrmParentWindow.Timer1Timer(Sender: TObject); var

temp1,temp2,temp3: string; begin

{Update Status Display} Str(frmMain.Crpe1.Records.Printed, temp1); Str(frmMain.Crpe1.Records.Read, temp2); Str(frmMain.Crpe1.Records.Selected, temp3); labelRecordsPrinted.Caption := temp1 + ' '; labelRecordsRead.Caption := temp2 + ' '; labelRecordsSelected.Caption := temp3 + ' ';

end;

Records

Declaration

property Records: TCrpeRecords;

Type

TCrpeRecords = class(TPersistent)

VCL Reference

84

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