Skip to main content

TCustomdxComponentPrinter.OnBeforePreview Event

Occurs before the preview window is to be activated.

Declaration

property OnBeforePreview: TdxPreviewEvent read; write;

Remarks

Handle this event to perform specific actions when displaying the preview window of the report contained in the link specified by the AReportLink parameter. For instance, the following code changes the caption of a preview window of the active link (dxComponentPrinter1BeforePreview is an OnBeforePreview event handler).

procedure TForm1.dxComponentPrinter1BeforePreview(Sender: Tobject; AReportLink: TBasedxReportLink);
begin
  dxComponentPrinter1.PreviewWindowForm.Caption := 'Report Preview Form';
end;
See Also