New to Telerik Reporting? Download free 30-day trial

Report Definition Storage Overview

The Report Definition Storage is a mandatory dependency component of the server-side Web Report Designer. This dependency is passed in the startup configuration. Its main purpose is to browse the available reports, retrieve and provide the report definition content when requested by name, save the content back in the repository when the save operation is requested, and delete report definitions. A component should implement the IDefinitionStorage interface so that it suits the needs of the designer and gets accepted in the configuration. The storage is passed as a setting of the ReportDesignerServiceConfiguration.

Available Report Definition Storage implementations

Out of the box, Telerik Reporting provides the FileDefinitionStorage storage implementation that enables using the server-side file system as a reports repository. It supports all declarative report definition files, e.g., TRDP, TRDX, and TRBP. It accepts a base directory that represents the root of the reports repository.

Additionally, an IDefinitionStorage implementation using MSSQL database and Entity Framework Core for .NET 7 is available in our GitHub Reporting Samples repository SqlDefinitionStorageExample. More details about the specific implementation may also be found in the KB article Implementing EFCore MSSQL IDefinitionStorage

Using Custom Report Definition Storage

To provide open and save functionality for reports stored differently, you need to implement the IDefinitionStorage interface. For example, you may need to enable the Web Report Designer to load reports from a specific database, cloud provider, in-memory cache, etc.

The easiest way to start implementing the needed storage is to copy the SqlDefinitionStorageExample storage and start changing it to meet your scenario.

To pass the new storage implementation, change the ReportDesignerServiceConfiguration.DefinitionStorage property to point to an instance of the class with the custom implementation of the definition storage, for example:

public ReportDesignerController()
{
    //...

    this.ReportDesignerServiceConfiguration = new ReportDesignerServiceConfiguration
    {
        DefinitionStorage = new CustomDefinitionStorage(),
        SettingsStorage = new FileSettingsStorage(this.reportsSettingsPath)
    };
}

The Web Report Designer previews the reports in the HTML5 Report Viewer. The latter utilizes a Telerik Reporting REST Service to render the reports. The client-side reportSource sent by the web designer is resolved to a server-side ReportSource by the Resolve method of the Reporting REST Service ReportSource Resolver. The ReportSource resolver is supposed to read report definitions created with the web report designer. For that reason, in the most of the cases when creating custom IDefinitionStorage it will be necessary to create also a custom IReportSourceResolver that can read the report definitions from the storage and return them as valid server-side ReportSources.

See Also

In this article