Skip to main content
All docs
V25.1
  • TdxReportNotifyEvent Type

    The procedural type for general report-related notification events.

    Declaration

    TdxReportNotifyEvent = procedure(ASender: TdxReport) of object;

    Parameters

    Name Type Description
    ASender TdxReport

    Provides access to the report generator component that raised the notification event.

    Remarks

    Handle report-related notification events to execute custom code in response to certain changes in your ExpressReports-powered application.

    Code Examples

    Save Report Layout to File on Every Change

    The following code example saves the current report to a REPX file every time a user saves pending changes in the Report Designer dialog:

    uses
      dxReport;  // Declares the TdxReport class
    // ...
    
    procedure TMyForm.dxReport1LayoutChanged(ASender: TdxReport);
    begin
      ASender.Layout.SaveToFile(ASender.ReportName + '.repx');
    end;
    

    Save Report Layout to Database on Every Change

    The following code example saves the current report to an existing BLOB dataset field every time a user saves pending changes in the Report Designer dialog:

    uses
      dxReport, // Declares the TdxReport class
      dxmdaset;  // Declares the TdxMemData class and related types
    // ...
    
    procedure TMyForm.dxReport1LayoutChanged(ASender: TdxReport);
    begin
      dxMemData1.Edit;
      dxMemData1.FieldByName('TemplateName').AsString := ASender.ReportName;
      dxMemData1.FieldByName('TemplateLayout').Assign(ASender.Layout);
      dxMemData1.Post;
    end;
    

    Direct TdxReportNotifyEvent Type Reference

    The TdxReport.OnLayoutChanged event references the TdxReportNotifyEvent procedural type.

    See Also