Back to Devexpress

TdxReport.OnDesignerFormShow Event

vcl-dxreport-dot-tdxreport-9cb78957.md

latest3.0 KB
Original Source

TdxReport.OnDesignerFormShow Event

Allows you to customize Report Designer dialog form settings.

Declaration

delphi
property OnDesignerFormShow: TdxBackendFormNotifyEvent read; write;

Remarks

Handle OnDesignerFormShow and OnViewerFormShow events to customize Report Designer and Report Viewer form settings. You can change caption, dimensions, position, and other settings as demonstrated in the following code example: Modify Report Viewer Form Settings.

Event Occurrence

The ShowDesigner procedure raises the OnDesignerFormShow event.

Event Parameters

The following parameters are available within an OnDesignerFormShow event handler:

ASenderProvides access to the TdxReport component that raised the OnDesignerFormShow event.AFormProvides access to the Report Viewer dialog form.

Code Example: Modify Report Viewer Form Settings

The following code example demonstrates an OnDesignerFormShow event handler that modifies caption, dimensions, and position of the Report Designer dialog when it is displayed:

delphi
uses
  dxReport; // Declares the TdxReport component
//...

procedure TMyForm.dxReport1DesignerFormShow(ASender: TObject; AForm: TForm);
begin
  AForm.Caption := 'My Report Designer'; // Changes the Report Designer form caption
  AForm.WindowState := wsNormal; // Switches from maximized to the normal form state
  AForm.Position := poScreenCenter; // Centers the dialog on the screen
  AForm.Width := 1200; // Specifies the dialog width
  AForm.Height := 800; // Specifies the dialog height
end;
cpp
#include "dxReport.hpp" // Declares the TdxReport component

// Add the following linker directive to the corresponding CPP source file:
#pragma link "dxReport" // Required to use dxReport.hpp declarations
// ...

void __fastcall TMyForm::dxReport1DesignerFormShow(TObject *ASender, TForm *AForm)
{
  AForm->Caption = "My Report Designer"; // Changes the Report Designer form caption
  AForm->WindowState = wsNormal; // Switches from maximized to the normal form state
  AForm->Position = poScreenCenter; // Centers the dialog on the screen
  AForm->Width = 1200; // Specifies the dialog width
  AForm->Height = 800; // Specifies the dialog height
}

See Also

TdxCustomDashboardControl.OnDesignerFormShow Event

TdxReport Class

TdxReport Members

dxReport Unit