ClassReportFileResolver
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:
[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:
Inherited Members
Constructors
ReportFileResolver()
Initializes a new instance of the ReportFileResolver class using the application root directory.
Declaration
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.
ReportFileResolver(string)
Initializes a new instance of the ReportFileResolver class with a specified repository directory.
Declaration
public ReportFileResolver(string repositoryDirectory)
Parameters
repositoryDirectory
string
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
ResolveReport(string)
Creates a UriReportSource instance based on the provided string representation of a report path.
Declaration
protected override ReportSource ResolveReport(string report)
Parameters
report
string
The string representation of the report path to resolve. Can be either a relative or absolute path to a .trdx/.trdp file.
Returns
A UriReportSource instance that represents the resolved report source.
Overrides
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.