IConnectionStorageService Interface

When implemented by a class, this interface allows you to store the data connection settings in WinForms and WPF applications.

Namespace: DevExpress.DataAccess.Wizard.Services

Assembly: DevExpress.DataAccess.v20.2.dll

Declaration

public interface IConnectionStorageService
Public Interface IConnectionStorageService

The following members accept/return IConnectionStorageService objects:

Library Related API Members
Cross-Platform Class Library ConfigureConnectionContext.ConnectionStorageService
EditFiltersContext.ConnectionStorageService
WinForms Controls ConfigureConnectionContext.ConnectionStorageService
EditFiltersContext.ConnectionStorageService

Remarks

The connections list in the End-User Report Designer's Data Source Wizard is populated with connections stored in the application's configuration file. Implement the IConnectionStorageService interface to initialize, save, and restore connection strings. Register the implemented interface to make the connection strings available in the End-User Report Designer:

  • Windows Forms

    Add the implemented interface to the XRDesignMdiController.

    View Example: WinForms End-User Designer - How to customize the data source wizard connection string storage

  • WPF

    Add the implemented interface to the ReportDesigner.ServicesRegistry collection.

    <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:dxrud="http://schemas.devexpress.com/winfx/2008/xaml/reports/userdesigner" x:Class="TestDesigner.MainWindow"
            Title="MainWindow" Height="350" Width="525">
        <dxrud:ReportDesigner Name="ReportDesigner">
            <dxrud:ReportDesigner.ServicesRegistry>
                <dxda:TypeEntry ServiceType="{x:Type dxdaw:IConnectionStorageService}" ConcreteType="{x:Type local:ConnectionStorageService}" />
                <dxda:TypeEntry ServiceType="{x:Type dxdaw:IConnectionProviderService}" ConcreteType="{x:Type local:ConnectionProviderService}" />
            </dxrud:ReportDesigner.ServicesRegistry>
        </dxrud:ReportDesigner>
    </Window>
    
IMPORTANT

Ensure that you protect sensitive connection data to avoid security issues. For instance, you can use the SqlDataConnection.BlackoutCredentials method to remove user credentials from connections strings.

See Also