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.v24.1.Web.dll
NuGet Package: DevExpress.Web.Reporting.Common
Declaration
public static void RegisterDataSourceWizardConnectionStringsProvider<T>()
where T : IDataSourceWizardConnectionStringsProvider
Type Parameters
Name |
---|
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 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);
}
// ...
}