New to Telerik ReportingStart a free 30-day trial

Resolves report file paths and creates UriReportSource instances from relative paths to .trdx/.trdp report files.

Definition

Namespace:Telerik.Reporting.Services.WebApi

Assembly:Telerik.Reporting.Services.WebApi.dll

Syntax:

C#
[Obsolete("The Telerik.Reporting.Services.WebApi.ReportFileResolver is now obsolete. Please use the Telerik.Reporting.Services.UriReportSourceResolver class instead.")]
public class ReportFileResolver : ReportResolverBase, IReportResolver

Inheritance: objectReportResolverBaseReportFileResolver

Implements: IReportResolver

Inherited Members ReportResolverBase.AddFallbackResolver(IReportResolver)

Constructors

Initializes a new instance of the ReportFileResolver class using the application root directory.

C#
public ReportFileResolver()
Remarks:

Relative paths will be resolved against the application root directory obtained from HttpContext.Current.Server.MapPath("~"). This constructor is suitable for web applications where reports are stored relative to the application root.

Initializes a new instance of the ReportFileResolver class with a specified repository directory.

C#
public ReportFileResolver(string repositoryDirectory)
Parameters:repositoryDirectorystring

The physical directory path where .trdx/.trdp report files are located. This directory serves as the base path for resolving relative report paths.

Remarks:

The repository directory is used as a path prefix when relative paths are provided for report resolution. Ensure the directory exists and the application has read permissions to access report files.

Methods

Creates a UriReportSource instance based on the provided string representation of a report path.

C#
protected override ReportSource ResolveReport(string report)
Parameters:reportstring

The string representation of the report path to resolve. Can be either a relative or absolute path to a .trdx/.trdp file.

Returns:

ReportSource

A UriReportSource instance that represents the resolved report source.

Overrides: ReportResolverBase.ResolveReport(string)

Remarks:

This method accepts both relative and absolute paths to report definition files. Relative paths are resolved against the repository directory specified during construction. Absolute paths are used as-is without modification.