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

{Attach Crystal Window to Parent Window} Crpe1.WindowParent := Form1;

{Crystal Window Size Settings} Crpe1.WindowSize.Top := 0; Crpe1.WindowSize.Left := 0; Crpe1.WindowSize.Height := Form1.Height - 30; Crpe1.WindowSize.Width := Form1.Width - 8;

{Run the Report}

Crpe1.Execute;

{On Form Resize}

procedure TForm1.FormResize(Sender: TObject); var

WinHandle: hWnd; begin

WinHandle := Crpe1.ReportWindowHandle;

SetWindowPos(WinHandle, HWND_TOP, 0, 0, Self.ClientWidth, Self.ClientHeight, SWP_NOZORDER);

end;

WindowSize

Declaration

property WindowSize: TCrpeWindowSize;

Type

TCrpeWindowSize = class(TPersistent)

Description

WindowSize contains four properties that determine the position and size of the Crystal Reports runtime Preview Window.

●The Top and Left properties determine the position of the Window, starting with the top left corner.

●The Height and Width properties determine the size of the window.

●The coordinates are in pixels.

●Use -1 for default Window size and placement.

●Values less than -1 will generate an error.

VCL Reference

126

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