New to Telerik Reporting? Download free 30-day trial

How to Use Microsoft.Data.SqlClient Data Provider in Web Report Designer

Environment

Product Progress® Telerik® Reporting
Report Designer Web Report Designer

Description

Visit the updated Integrating the Microsoft SQL Client Data Provider article for a how-to on connecting to MS SQL Databases.

The Telerik Reporting engine is extensible and it provides options to register virtually any DbProvider to be used in your application. For .NET Framework this is done in the application configuration file, as explained in this article: Registering SqlDataSource data providers without installing driver.

Solution

For .NET Core applications, the approach is a bit different. Our assemblies are targeting .NET Standard 2.0 where DbProviderFactories class does not exist. Internally we have our own implementation of that class and this article explains how to register a new DbProvider in one line: How to register a DbProviderFactory in a .NET Core project.

However, the application configuration file needs to be modified too. The connection string should contain information which provider to use. If no provider is mentioned, the default one: System.Data.SqlClient will be used.

For that reason, the connection string entry should contain information about the DbProvider name, as shown below:

"ConnectionStrings": {
    "DefaultConnection": {
        "connectionString": "Data Source=tcp:fhwa-tmas-sql-svr-pool-dev.database.windows.net,1433;Initial Catalog=fhwa-tmas-sql-pool-dev;Persist Security Info=False;Authentication=Active Directory Integrated;Connection Timeout=30;",
        "providerName": "Microsoft.Data.SqlClient"
}

See Also

Download a video that shows the whole process

In this article