Skip to main content
All docs
V26.1
  • TdxCustomReportControl.OnResolveConnection Event

    Allows you to map different data connection components to the same data source name referenced within the current report layout definition.

    Declaration

    property OnResolveConnection: TdxReportControlResolveConnectionEvent read; write;

    Remarks

    Handle the OnResolveConnection event to manually map data connections to their display names used in a template/layout definition.

    Event Occurrence

    The manual data connection resolution event occurs every time a TdxReportControl component is about to access available data sources (in the Viewer or Designer scope):

    TdxReportControl | Report Viewer
    Viewer Scope. The manual data connection resolution event occurs when TdxReportControl/Report Viewer populates or updates placeholders within the layout definition with data – once per active data connection component referenced within the layout.
    Report Designer
    Designer Scope. The manual data connection resolution event occurs once for each active (that is, available to the Report Designer dialog) data connection component within the application.

    You can assign a data connection component to the AConnection parameter within a TdxReportControlResolveConnectionEvent handler to manually map the component to the referred display name for the current data access/load operation.

    In addition, you can assign nil (in Delphi) or nullptr (in C++Builder) to the AConnection parameter to hide the currently processed connection in the Report Designer dialog.

    Note

    • The manual data connection resolution event occurs even if the application or template/layout definition contains only one active data connection component (or multiple data connection components with unique DisplayName property values). You can remap a unique display name to another data connection component if necessary.
    • This event never occurs for inactive data access components.

    Event Parameters

    The following parameters are available within an OnResolveConnection event handler:

    ASender
    Provides access to the TdxReportControl component that raised the OnResolveConnection event.
    ADisplayName
    Returns the target data connection name (DisplayName) referenced in the current report layout definition (or available within the application if the Report Designer dialog is displayed).
    AConnection

    Specifies the data connection component that corresponds to the currently processed data connection name (ADisplayName).

    Use the AConnection parameter to select a specific connection component as the data source associated with the processed connection name (ADisplayName) for the current TdxReportControl component (ASender).

    Refer to the TdxReportControlResolveConnectionEvent procedural type description for detailed information on parameters accessible within an OnResolveConnection event handler.

    See Also