Back to Devexpress

DefaultReportDesignerContainer.RegisterDataSourceWizardConfigFileMongoDBConnectionStringsProvider() Method

xtrareports-devexpress-dot-xtrareports-dot-web-dot-reportdesigner-dot-defaultreportdesignercontainer.md

latest3.6 KB
Original Source

DefaultReportDesignerContainer.RegisterDataSourceWizardConfigFileMongoDBConnectionStringsProvider() Method

Registers the built-in MongoDB connection strings provider. This enables the Web Report Designer to retrieve MongoDB connection strings from the application configuration file.

Namespace : DevExpress.XtraReports.Web.ReportDesigner

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

NuGet Package : DevExpress.Web.Reporting.Common

Declaration

csharp
public static void RegisterDataSourceWizardConfigFileMongoDBConnectionStringsProvider()
vb
Public Shared Sub RegisterDataSourceWizardConfigFileMongoDBConnectionStringsProvider

Remarks

The Data Source Wizard and Report Wizard uses a connection strings provider to obtain data connections. Once a provider is registered, users can create new data sources based on registered MongoDB connection strings.

To allow users to create MongoDB data sources in ASP.NET MVC and ASP.NET Web Forma applications, do the following:

  1. Install the MongoDB.Driver NuGet package.
  2. Add MongoDB connection strings (for example, mongodb://... or mongodb+srv://...) to the application’s configuration file (Web.config).
  3. Call the RegisterDataSourceWizardConfigFileMongoDBConnectionStringsProvider method at application startup to register the default MongoDB connection strings provider:

You can also implement a custom connection string provider for MongoDB. For more information, refer to the following topics:

See Also

Register MongoDB Data Connections (ASP.NET Web Forms)

Register MongoDB Data Connections (ASP.NET MVC)

DefaultReportDesignerContainer Class

DefaultReportDesignerContainer Members

DevExpress.XtraReports.Web.ReportDesigner Namespace