processing Element
The Processing element specifies the configuration settings that will be applied during the processing of the report.
<processing>
element
Attributes | cacheDefinitionProperties - optional boolean attribute. Determines if the report definition properties will be cached during the processing, making them immutable. |
Child elements |
resourceResolver – optional element. Changes the behavior of the default resource resolving mechanism. Only one resourceResolver element can be used in the <processing> element. |
Parent element |
Telerik.Reporting - specifies the root element of the Telerik Reporting configuration settings. Only one <processing> element can be used in the Telerik.Reporting element. |
Example
XML-based configuration file:
<Telerik.Reporting>
<processing cacheDefinitionProperties="false">
<!--The element below represents a Path resource resolver:-->
<!--<resourceResolver provider="path">
<parameters>
<parameter name="directory" value="c:\\CommonResourcesDirectory\\" />
</parameters>
</resourceResolver>-->
<!-- The element below represents a custom implementation of resource resolver:-->
<resourceResolver provider="custom">
<parameters>
<parameter name="typeName" value="CustomResourceResolver.RawDataResourceResolver, CustomResourceResolver" />
<parameter name="constructorParameter1" value="constructorParameterValue1" />
</parameters>
</resourceResolver>
</processing>
</Telerik.Reporting>
JSON-based configuration file:
"telerikReporting": {
"processing": {
"cacheDefinitionProperties": "false",
"resourceResolver": {
// The element below represents a Path resource resolver:
//"provider": "path",
//"parameters": [
// {
// "name": "directory",
// "value": "C:\\Temp\\RestServiceStorage"
// }
//]
// The element below represents a custom implementation of resource resolver:
"provider": "custom",
"parameters": [
{
"name": "typeName",
"value": "CustomResourceResolver.RawDataResourceResolver, CustomResourceResolver"
},
{
"name": "constructorParameter1",
"value": "constructorParameterValue1"
}
]
}
}
}
CacheDefinitionProperties
We provide a mechanism for caching the report definition properties that boosts the performance. Naturally it prevents modifying the report during processing stage. The default value of the property is True.
Basically, the Report Events are not intended to be used to modify the report definition, as explained in the Understanding Events article. For that reason, in R3 2016 for performance reasons, we introduced a change- cacheDefinitionProperties which caches the report definition properties, so such modifications are not respected. Setting the cacheDefinitionProperties to false will skip the definition item properties caching, which will allow the report definition to be changed in the report events. This may result in parformance penalty though.
ResourceResolver
resourceResolver element allows to alter the default resource-resolving mechanism. This element determines what instance of the Telerik.Reporting.Interfaces.IResourceResolver interface will be used by the processing engine to resolve the resources that are specified in the report definition. Such resources are:
Images used by Telerik.Reporting.PictureBox and Telerik.Reporting.CheckBox report items, referenced by a relative path.
Elements from report's Telerik.Reporting.Drawing.ExternalStyleSheet collection, referenced by a relative path.
Source property of Telerik.Reporting.Data.CsvDataSource and Telerik.Reporting.Data.JsonDataSource report items, referenced by a relative path.
This ResourceResolver is intended to be used in scenarios where the resources are not retrieved from a local file path but rather obtained from a different type of storage. As an example, Telerik Report Server persists its assets in a storage that can be file-based or can use a MSSQL or Redis database as a backend. Processing a report definition that has relative paths to its resources would not work in this scenario, unless the necessary resources are not placed in folders relative to the root of the Telerik Report Server web application. The custom resource resolver can be used here to provide specific logic that will retrieve the necessary resources as byte arrays using the resource identifier from the report definition.
<resourceResolver>
element
Attributes |
provider – required string attribute. Determines the provider type of the ResourceResolver instance. Only two types are supported:
|
Child elements |
parameters – specifies a collection of parameters for the resource resolver in the <resourceResolver> element. Only one parameters element can be used in the <resourceResolver> element.Supported parameters for path provider
|
Parent element | processing - specifies the parent element of the Telerik Reporting configuration settings. |