Report Engine Configuration Overview
Particular settings can be applied to the Telerik Reporting engine to influence its behavior or extend it. These are defined in the application's configuration file. For Windows and WPF applications the configuration file is called app.config
, for ASP.NET Framework applications – web.config
. This configuration file is XML-based and its content is divided into sections.
On the other hand, .NET Core applications provide another way of storing configuration - a key-value JSON-based file named appsettings.json
. For .NET Core console applications both configuration types are supported, but appsettings.json has precedence over app.config. ASP.NET Core applications no longer use web.config so the configuration should be set to any of the supported key-value-based files.
For more information about configuring a .NET application, see Configuring Apps by using Configuration Files.
Telerik Reporting Configuration Layout
Telerik Reporting root element
The root element of the configuration is named <Telerik.Reporting>
in XML-based configuration files and "telerikReporting"
in JSON-based configuration files. All the settings of the Reporting engine are nested in this root element.
Attributes | No attributes are defined for this element |
Child elements |
extensions Element- specifies a collection of extensions, for which the configuration is applied cache Element- specifies the configuration settings for the cache management system which is utilized by the viewers to store and cache rendered pages and resources. restReportService Element- specifies the configuration settings for the REST report service. assemblyReferences Element- specifies a collection of assembly references that are used from Reporting Engine during processing stage to resolve names of user functions and user aggregate functions. privateFonts Element- specifies a collection that allows the Reporting Engine to use a private version of a font without installing the font on the host machine. This element is mandatory for rendering PDF files on Linux in a .Net Core application. appData Element- specifies the configuration settings for the temporary application data stored on the machine. dpiAware Element- specifies the application's DPI awareness setting which affects the reports rendering. |
Parent element | Configuration - Specifies the required root element in every configuration file that is used by the common language runtime and the .NET Framework applications. Only one Telerik.Reporting element can be used in the Configuration element. |
XML-based Configuration
The snippets in this section show the <Telerik.Reporting>
configuration used in XML-based configuration files like app.config
and web.config
.
The settings for the Telerik Reporting engine are stored in a custom configuration section called Telerik.Reporting
. The declaration of this section has to be included in a <configSections>
element which should be the first child element of <configuration>
, like this:
<configuration>
<configSections>
<section
name="Telerik.Reporting"
type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=x.x.x.x, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
allowLocation="true"
allowDefinition="Everywhere"/>
</configSections>
…
</configuration>
The custom configuration section's content:
<Telerik.Reporting>
<extensions>
<render>
<extension>
<parameters>
<parameter/>
</parameters>
</extension>
</render>
</extensions>
<cache>
<providers>
<provider>
<parameters>
<parameter/>
</parameters>
</provider>
</providers>
</cache>
<processing>
<graphicsEngine>
</graphicsEngine>
<resourceResolver>
<parameters>
<parameter/>
</parameters>
</resourceResolver>
<sharedResourceResolver>
<parameters>
<parameter/>
</parameters>
</sharedResourceResolver>
</processing>
<restReportService>
<reportResolver/>
<storage>
<parameters>
<parameter/>
</parameters>
</storage>
</restReportService>
<assemblyReferences>
<add />
<clear />
<remove />
</assemblyReferences>
<privateFonts>
<add />
</privateFonts>
<fontLibrary>
</fontLibrary>
<dpiAware>
</dpiAware>
<appData>
</appData>
</Telerik.Reporting>
JSON-based Configuration
The JSON-based configuration structure used in appsettings.json
or other key-value-based files looks like the following:
"telerikReporting": {
"extensions": [
{
"name": null,
"parameters": [
{
"name": null,
"value": null
}
]
}
],
"cache": {
"provider": null,
"providers": [
{
"name": null,
"parameters": [
{
"Name": null,
"Value": null
}
]
}
]
},
"processing": {
"graphicsEngine": {
"engineName": null
},
"cacheDefinitionProperties": null,
"resourceResolver": {
"provider": null,
"parameters": [
{
"name": null,
"value": null
},
{
"name": null,
"value": null
}
]
},
"sharedDataSourceResolver": {
"provider": null,
"parameters": [
{
"name": null,
"value": null
}
]
}
},
"restReportService": {
"hostAppId": null,
"workerCount": 0,
"reportSharingTimeout": 0,
"clientSessionTimeout": 0,
"reportResolver": {
"provider": null,
"parameters": [
{
"name": null,
"value": null
}
]
},
"storage": {
"provider": null,
"parameters": [
{
"name": null,
"value": null
}
]
}
},
"assemblyReferences": [
{
"name": null,
"version": null,
"culture": null
}
],
"privateFonts": [
{
"fontFamily": null,
"path": null,
"fontStyle": null
}
],
"fontLibrary":{
"useDefaultLocations": "true",
"fontLocations": [
{
"path": null,
"searchSubfolders": null
}
]
},
"dpiAware": {
"dpiAwareness": null
},
"appData": {
"Path": null
}
}