Skip to main content
A newer version of this page is available. .

DefaultReportDesignerContainer.RegisterDataSourceWizardConnectionStringsProvider<T>(Boolean) Method

Registers the connection strings provider for custom data connections with a parameter value specifying whether or not to override connections defined in the application’s Web.config file.

Namespace: DevExpress.XtraReports.Web.ReportDesigner

Assembly: DevExpress.XtraReports.v18.2.Web.dll

Declaration

public static void RegisterDataSourceWizardConnectionStringsProvider<T>(
    bool overrideWebConfigConnections
)
    where T : IDataSourceWizardConnectionStringsProvider, new()

Parameters

Name Type Description
overrideWebConfigConnections Boolean

true, to override connections defined in the application’s Web.config file (and never save data connection parameters along with report layouts); otherwise, false.

Type Parameters

Name
T

Remarks

A custom connection strings provider (that implements the IDataSourceWizardConnectionStringsProvider interface) strictly defines which data connections will be available in the Web Report Designer.

When the overrideWebConfigConnections parameter value is set to true, the registered data connections will override those defined in the application’s Web.config file and data sources created using the SQL Data Source Wizard will store only the connection name (the connection parameters will be discarded).

In this case, the connections defined in the registered connection strings provider will be displayed on editing any data sources available in the Web Report Designer. The following data sources are possible.

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

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