Overview
The Microsoft.Data.SqlClient namespace is essentially a new version of the System.Data.SqlClient namespace and can thus be used for connecting to Microsoft SQL Databases.
Setting up the Microsoft.Data.SqlClient Data Provider in the .NET Standalone Report Designer
- Create a new .NET 8 Console Application project.
- Install the Microsoft.Data.SqlClient NuGet package to it and
build
the project. - Navigate to the
bin/Debug/net8.0
subdirectory of the project, and copy all assemblies there except for the assembly with the name of the project. - Paste the assemblies in the .NET Standalone Report Designer installation directory e.g.
C:\Program Files (x86)\Progress\Telerik Reporting 2025 Q1\Report Designer\.NET
. - The
bin/Debug/net8.0
folder of the console application should contain an additional folder namedruntimes
with several subfolders such aswin
,unix
,win-x64
, etc. Copy the DLLs from the folders that correspond to your Operating System and CPU architecture. - Paste the additional runtime assemblies in the .NET Standalone Report Designer installation directory e.g.
C:\Program Files (x86)\Progress\Telerik Reporting 2025 Q1\Report Designer\.NET
. - Restart the designer if you have previously opened it.
- Add a new SQL DataSource and you should see that the
Microsoft.Data.SqlClient
Data Provider is in the dropdown.
Setting up the Microsoft.Data.SqlClient Data Provider in .NET Applications
.NET Application with the Web Report Designer
- Install the Microsoft.Data.SqlClient NuGet package to it and
build
the project. -
Register the SqlClientFactory.Instance in the
Telerik.Reporting.Processing.Data.DbProviderFactories
using theRegisterFactory
method within thestatic
constructor of the controller that inherits from ReportDesignerControllerBase. For example:[Route("api/reportdesigner")] public class ReportDesignerController : ReportDesignerControllerBase { static ReportDesignerController() { Telerik.Reporting.Processing.Data.DbProviderFactories.RegisterFactory("Microsoft.Data.SqlClient", Microsoft.Data.SqlClient.SqlClientFactory.Instance); } public ReportDesignerController(IReportDesignerServiceConfiguration reportDesignerServiceConfiguration, IReportServiceConfiguration reportServiceConfiguration) : base(reportDesignerServiceConfiguration, reportServiceConfiguration) { } }
-
If the SqlDataSource component uses a
shared
connection where it is retrieved from the configuration file of the project(e.g.appsettings.json
), the provider name must be specified in the connection. For example:{ "ConnectionStrings":{ "mssql":{ "connectionString":"Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;", "providerName":"Microsoft.Data.SqlClient" } } }
.NET Application with Web Report Viewer
- Install the Microsoft.Data.SqlClient NuGet package to it and
build
the project. -
Register the SqlClientFactory.Instance in the
Telerik.Reporting.Processing.Data.DbProviderFactories
using theRegisterFactory
method within thestatic
constructor of the controller that inherits from ReportsControllerBase. For example:[Route("api/reports")] public class ReportsController : ReportsControllerBase { static ReportsController() { Telerik.Reporting.Processing.Data.DbProviderFactories.RegisterFactory("Microsoft.Data.SqlClient", Microsoft.Data.SqlClient.SqlClientFactory.Instance); } public ReportsController(IReportServiceConfiguration reportServiceConfiguration) : base(reportServiceConfiguration) { } }
-
If the SqlDataSource component uses a
shared
connection where it is retrieved from the configuration file of the project(e.g.appsettings.json
), the provider name must be specified in the connection. For example:{ "ConnectionStrings":{ "mssql":{ "connectionString":"Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;", "providerName":"Microsoft.Data.SqlClient" } } }