ReportDesignerConfigurationBuilder.RegisterDataSourceWizardConnectionStringsProvider<T>() Method

Registers a custom connection string provider that specifies the data connections to be available for an end-user within the SQL Data Source Wizard.

Namespace: DevExpress.AspNetCore.Reporting

Assembly: DevExpress.AspNetCore.Reporting.v18.2.dll

Declaration

public ReportDesignerConfigurationBuilder RegisterDataSourceWizardConnectionStringsProvider<T>()
    where T : class, IDataSourceWizardConnectionStringsProvider
Public Function RegisterDataSourceWizardConnectionStringsProvider(Of T As {Class, IDataSourceWizardConnectionStringsProvider}) As ReportDesignerConfigurationBuilder

Returns

Type Description
ReportDesignerConfigurationBuilder

A ReportDesignerConfigurationBuilder that can be used to further configure the Report Designer services.

Type Parameters

Name Description
T

A custom connection string provider that implements the IDataSourceWizardConnectionStringsProvider interface.

A connection string provider defines which data connections are available in the Web Report Designer. To define a custom provider, implement the IDataSourceWizardConnectionStringsProvider interface. To use the custom provider in your application, register it using the RegisterDataSourceWizardConnectionStringsProvider method, passing the provider as a typed parameter.

using DevExpress.DataAccess.ConnectionParameters;
using DevExpress.DataAccess.Native;
using DevExpress.DataAccess.Web;
using System.Collections.Generic;
// ... 

public class MyDataSourceWizardConnectionStringsProvider : IDataSourceWizardConnectionStringsProvider {
    public Dictionary<string, string> GetConnectionDescriptions() {

    }

    public DataConnectionParametersBase GetDataConnectionParameters(string name) {

    }
}

When using this method to register a custom connection string provider, data connection parameters are serialized with the report data source when the report is passed to the client. These parameters are encrypted by the default ASP.NET Core data protection service. You can also implement the ISecureDataConverter interface to provide a custom data protection mechanism.

You can use the other overload of the RegisterDataSourceWizardConnectionStringsProvider method and pass true as a parameter, so that connection parameters are not serialized with the report data source. In this instance, only the connection name will be serialized with the report definition.

Note

Use the RegisterDataSourceWizardConfigFileConnectionStringsProvider() method to register a predefined connection string provider. In this instance, the connection strings specified in the project's appsettings.json file are enlisted in the SQL Data Source Wizard.

See Also