Configuring an MSSQL Database Storage for the Reporting REST Service
This article explains how to configure an MSSQL Database for the Reporting REST Service storage.
-
Ensure a database instance is available for Reporting REST Service storage. This may be a dedicated database or a shared database for both app data and Reporting REST Service storage.
- Start the Telerik Database Cache Configurator tool located in the {Telerik Reporting installation folder}/Tools folder.
- In Choose database usage combo-box select the "Configure REST service storage database" option.
- In Choose target backend combo-box select the "Microsoft SQL Server" option.
- In Specify connection string text box enter the connection string that references the target database. You can also click the Build button and create the connection string using the Connection properties form.
- Click on the Create schema button to start the database schema creation.
- A message box should be displayed, confirming that the storage tables are successfully created. Use the connection string specified above when initializing an instance of MsSqlServerStorage in your application.
- In case you want to cleanup the storage tables in an existing database, use the button Clear cache data.
-
Configure your Telerik Reporting REST Service to use the database storage we just prepared. You may do this in the configuration file of the project as elaborated in the article restReportService Element, or when instantiating the ReportServiceConfiguration. Here are samples for both scenarios:
-
Through code when passing ReportServiceConfiguration instance to the REST Service.
The ReportSourceResolver and Storage configuration settings are required. See the IReportServiceConfiguration interface for more details.
-
Through a configuration file:
-
You need to pass a ConfigSectionReportServiceConfiguration instance to the REST Service:
The properties from the initialization block would override the values obtained from the configuration file.
-
Set the corresponding properties values in the REST Service configuration file:
-
XML-based configuration file:
-
JSON-based configuration file:
Since the Telerik Reporting Q1 2025 release, the MSSQL storage relies on
System.Data.SqlClient
to connect to the provided database in .NET Framework applications, and onMicrosoft.Data.SqlClient
in .NET applications. In previous versions, theSystem.Data.SqlClient
data provider was used for each target framework.
-
-
-