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

Description

The Height property specifies the height of the Preview Window, in pixels. Use -1 for default.

Example

The following example displays a Report in a Preview Window. The window will appear in the upper left corner of the screen and will be 300 pixels high, and 500 pixels wide:

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

with Crpe1.WindowSize do begin

Left := 0;

Top := 0; Height := 300; Width := 500;

end; Crpe1.Execute;

WindowSize Left property

Declaration

property Left: smallint;

Description

The Left property specifies the x coordinate of the upper left corner of the Preview Window, in pixels. Use -1 for default.

Example

The following example displays a Report in a Preview Window. The window will appear in the upper left corner of the screen and will be 300 pixels high, and 500 pixels wide:

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

with Crpe1.WindowSize do begin

Left := 0;

Top := 0; Height := 300; Width := 500;

end; Crpe1.Execute;

VCL Reference

702

WindowSize Top property

Declaration

property Top: smallint;

Description

The Top property specifies the y coordinate of the upper left corner of the Preview Window, in pixels. Use -1 for default.

Example

The following example displays a Report in a Preview Window. The window will appear in the upper left corner of the screen and will be 300 pixels high, and 500 pixels wide:

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

with Crpe1.WindowSize do begin

Left := 0;

Top := 0; Height := 300; Width := 500;

end; Crpe1.Execute;

WindowSize Width property

Declaration

property Width: smallint;

Description

The Width property specifies the width of the Preview Window, in pixels. Use -1 for default.

VCL Reference

703

Example

The following example displays a Report in a Preview Window. The window will appear in the upper left corner of the screen and will be 300 pixels high, and 500 pixels wide:

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

with Crpe1.WindowSize do begin

Left := 0;

Top := 0; Height := 300; Width := 500;

end;

Crpe1.Execute;

WindowSize Methods

WindowSize Clear method

Declaration

procedure Clear;

Description

The Clear method clears the WindowSize properties, setting them all to their default values:

Top

:= -1;

Left

:= -1;

Width

:=

-1;

Height :=

-1;

It is called automatically if the Clear method is called for the main component, but may be called in code as needed.

Example

This line of code clears the WindowSize properties:

Crpe1.WindowSize.Clear;

VCL Reference

704

WindowSize CopyFrom method

Declaration

function CopyFrom(Source: TCrpeWindowSize): boolean;

Description

The CopyFrom method copies the WindowSize property values from another TCrpeWindowSize object. It is similar to Delphi's Assign method. It is useful for transferring or temporary storage of values.

Example

The following example copies all the WindowSize property values to a temporary TCrpeWindowSize object:

var

tempWindowSize : TCrpeWindowSize; begin

tempWindowSize := TCrpeWindowSize.Create; tempWindowSize.CopyFrom(Crpe1.WindowSize); {...later, when finished with the temp object...} tempWindowSize.Free;

end;

WindowSize Create method

Declaration

constructor Create;

Description

The Create method is used internally in the Crystal component and does not need to be called in code.

WindowSize Retrieve method

Declaration

function Retrieve: boolean;

VCL Reference

705

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