Class ReportServiceBase
The base class of the Telerik Reporting WCF Service.
Inheritance
Inherited Members
Namespace: Telerik.Reporting.Service
Assembly: Telerik.Reporting.Service.dll
Syntax
public abstract class ReportServiceBase : IReportService, IResourceService, IClientAccessPolicy
Constructors
ReportServiceBase()
Declaration
protected ReportServiceBase()
Properties
ApplicationPath
When implemented, returns the file system path of the current application's root directory. It is used to resolve the relative paths of the UriReportSources.
Declaration
protected abstract string ApplicationPath { get; }
Property Value
System.String
|
Remarks
Should return a valid directory path that ends with a slash (/) or a backslash ()
BaseAddress
When implemented, returns the base address of the Telerik ReportService that will be used as a base Uri for the resources
Declaration
protected abstract Uri BaseAddress { get; }
Property Value
System.Uri
|
ReportResolver
Methods
GetState(String)
Gets a value from the internal storage.
Declaration
protected virtual object GetState(string name)
Parameters
System.String
name
The key name of the state value. |
Returns
System.Object
The state value with the specified name. |
Remarks
The internal storage represents a central place for storing shared data between the service calls.
Render(String, String, NameValueDictionary, NameValueDictionary)
Renders a report and returns the generated document.
Declaration
public RenderingResult Render(string format, string report, NameValueDictionary deviceInfo, NameValueDictionary parameterValues)
Parameters
System.String
format
The render format. |
System.String
report
The System.Type.AssemblyQualifiedName of the report type to render. |
NameValueDictionary
deviceInfo
A dictionary with setting for the current render format. |
NameValueDictionary
parameterValues
A dictionary with values for the report parameters. |
Returns
RenderingResult
A RenderingResult that contains the generated document bytes and info. |
Implements
SetState(String, Object)
Adds a value to the internal storage.
Declaration
protected virtual void SetState(string name, object value)
Parameters
System.String
name
The key name of the state value. |
System.Object
value
The state value with the specified name. |
Remarks
The internal storage represents a central place for storing shared data between the service calls.
Explicit Interface Implementations
IClientAccessPolicy.GetClientAccessPolicy()
Returns security policy file required by Silverlight when accessing a cross-domain service.
Declaration
Stream IClientAccessPolicy.GetClientAccessPolicy()
Returns
System.IO.Stream
A System.IO.Stream that contains the clientaccesspolicy.xml |
Implements
Remarks
If the connection request was from a WebClient or an HTTP class to a cross-domain site, the Silverlight runtime tries to download the security policy file using the HTTP protocol. The Silverlight runtime first tries to download a Silverlight policy file with a name of "clientaccesspolicy.xml" at the root of the requested target domain using the HTTP protocol.
Override this method in order to change the default access policy for ReportServiceBase.
The default implementation of the IClientAccessPolicy interface returns a general policy that policy accepts connections from any domain and allows request headers and specifies resources that can be accessed and includes sub-paths of these resources:
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
IReportService.GetPage(String, Int32)
Retrieves a rendered page for the given rendering session ID and page number. This operation is intended for internal use only.
Declaration
PageInfo IReportService.GetPage(string instanceID, int pageNumber)
Parameters
System.String
instanceID
The unique identifier of the rendering session as returned by a previous call to RenderAndCache operation. |
System.Int32
pageNumber
The serial number of the page to retrieve. |
Returns
PageInfo
A PageInfo that contains the page data. |
Implements
IReportService.GetReportParameters(String, NameValueDictionary, NameValueDictionary)
Retrieves a list of report parameters for the given report and values. This operation is intended for internal use only.
Declaration
List<Parameter> IReportService.GetReportParameters(string report, NameValueDictionary deviceInfo, NameValueDictionary parameterValues)
Parameters
System.String
report
The System.Type.AssemblyQualifiedName of the report type for which to obtain the parameters. |
NameValueDictionary
deviceInfo
A dictionary with settings for the current device. |
NameValueDictionary
parameterValues
A dictionary with values for the report parameters. |
Returns
System.Collections.Generic.List<Parameter>
A list of report parameters. |
Implements
IReportService.ListAvailableReports()
Retrieves the list of the available for the service reports.
Declaration
IList<ReportInfo> IReportService.ListAvailableReports()
Returns
System.Collections.Generic.IList<ReportInfo>
List of the available reports. |
Implements
IReportService.ListRenderingExtensions()
Retrieves the list of available rendering extensions. This operation is intended for internal use only.
Declaration
IList<ExtensionInfo> IReportService.ListRenderingExtensions()
Returns
System.Collections.Generic.IList<ExtensionInfo>
List of available rendering extensions. |
Implements
IReportService.RenderAndCache(String, String, NameValueDictionary, NameValueDictionary)
Renders a report and stores the result in the current session. This operation is intended for internal use only.
Declaration
RenderingSessionInfo IReportService.RenderAndCache(string format, string report, NameValueDictionary deviceInfo, NameValueDictionary parameterValues)
Parameters
System.String
format
The render format. |
System.String
report
The System.Type.AssemblyQualifiedName of the report type to render. |
NameValueDictionary
deviceInfo
A dictionary with setting for the current render format. |
NameValueDictionary
parameterValues
A dictionary with values for the report parameters. |
Returns
RenderingSessionInfo
A RenderingSessionInfo that contains the result of the rendering operation. |
Implements
Remarks
Requires ASP.NET session.
IResourceService.Export(String, String, String, String)
Retrieves a report document.
Declaration
Stream IResourceService.Export(string format, string report, string deviceInfo, string parameterValues)
Parameters
System.String
format
The render format. |
System.String
report
The System.Type.AssemblyQualifiedName of the report type to render. |
System.String
deviceInfo
JSON-formatted dictionary (key/value pairs) with DeviceInfo settings for the current render format. |
System.String
parameterValues
JSON-formatter (key/value pairs) with the parameter values for the current report. |
Returns
System.IO.Stream
|
Implements
Remarks
Requires HTTP GET request.
IResourceService.ExportCachedReport(String, String, String)
Declaration
Stream IResourceService.ExportCachedReport(string instanceID, string format, string deviceInfo)
Parameters
System.String
instanceID
|
System.String
format
|
System.String
deviceInfo
|
Returns
System.IO.Stream
|
Implements
IResourceService.GetRenderStream(String, String)
Retrieves a render stream created during a report rendering session.
Declaration
Stream IResourceService.GetRenderStream(string instanceID, string name)
Parameters
System.String
instanceID
The unique identifier of the rendering session that resource belongs to. |
System.String
name
The name of the resource. |
Returns
System.IO.Stream
|
Implements
Remarks
Requires HTTP GET request.