DefaultReportDesignerContainer.RegisterDataSourceWizardConfigFileConnectionStringsProvider() Method
Enables the Web Report Designer to use the data source connections specified in the configuration file of the web application.
Namespace: DevExpress.XtraReports.Web.ReportDesigner
Assembly: DevExpress.XtraReports.v20.2.Web.dll
NuGet Package: DevExpress.Web.Reporting.Common
Declaration
Remarks
A connection strings provider is used by the Data Source Wizard to obtain available data connections. The following code sample shows how to register the connection strings provider on application startup.
public class Global_asax : System.Web.HttpApplication {
void Application_Start(object sender, EventArgs e) {
//...
// Register a connection strings provider
DefaultReportDesignerContainer.RegisterDataSourceWizardConfigFileConnectionStringsProvider();
}
//...
}
When the SQL Data Source wizard obtains connection strings from the Web.config file, the serialized report contains only the connection name (and not the connection string itself).
You can register a custom connection string provider and store all the connection parameters or only the connection name with the serilaized data source. When the report serialized with connection parameters is passed to the client, these parameters are encrypted by applying the MachineKey algorithm. To provide a custom encryption mechanism, use the ISecureDataConverter interface.
Refer to the following topics for more information on data connection registration:
- ASP.NET Web Forms - Register Data Connections
- ASP.NET MVC - Register Data Connections
- ASP.NET Core - Register Data Connections
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RegisterDataSourceWizardConfigFileConnectionStringsProvider() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.