The requested page is not available for the requested platform. You are viewing the content for Default platform.

DefaultReportDesignerContainer.RegisterDataSourceWizardConnectionStringsProvider<T>() Method

Registers the connection strings provider for custom data connections (without overriding connections defined in the application's Web.config file).

Namespace: DevExpress.XtraReports.Web.ReportDesigner

Assembly: DevExpress.XtraReports.v19.1.Web.dll

Declaration

public static void RegisterDataSourceWizardConnectionStringsProvider<T>()
    where T : IDataSourceWizardConnectionStringsProvider
Public Shared Sub RegisterDataSourceWizardConnectionStringsProvider(Of T As IDataSourceWizardConnectionStringsProvider)

Type Parameters

Name Description
T

Remarks

A custom connection strings provider (that implements the IDataSourceWizardConnectionStringsProvider interface) defines which data connections will be available for an end-user when configuring the report data source using the SQL Data Source Wizard.

The following code sample shows how to register the custom connection strings provider by calling the RegisterDataSourceWizardConnectionStringsProvider<T> method on application start.

public class Global_asax : System.Web.HttpApplication {
    void Application_Start(object sender, EventArgs e) {
        //...
        // Register the custom connection strings provider
        DefaultReportDesignerContainer.RegisterDataSourceWizardConnectionStringsProvider<CustomConnectionStringsProvider>();
    }
    //...
}

Alternatively, you call this method with the overrideWebConfigConnections parameter. When this parameter value is set to true, the registered data connection will override those defined in the application's Web.config file (no data connection parameters will ever be saved along with report layouts, providing proper data connection security).

using DevExpress.XtraReports.Web.ReportDesigner;
using System;
// ...

public class Global_asax : System.Web.HttpApplication {
    void Application_Start(object sender, EventArgs e) {
        // ...
        // Register the custom connection strings provider.
        DefaultReportDesignerContainer.RegisterDataSourceWizardConnectionStringsProvider<MyDataSourceWizardConnectionStringsProvider>(true);
    }
    // ...
}
See Also