TypeReferences Element Overview
Defines a collection of type references used by the Reporting Engine to resolve the custom types permitted to be used during the design and processing stages. The assemblies used by the types in TypeReferences section are loaded into application domain if the type is successfully resolved, so it's not necessary to declare the assembly also in the AssemblyReferences section.
XML-based configuration file:
<TypeReferences>
<add />
<clear />
<remove />
</TypeReferences>
JSON-based configuration file:
"typeReferences": [
],
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes |
|
Child Elements |
|
Parent Elements |
|
Example
The following code example demonstrates how to configure the Reporting Engine to use the MyNamespace.MyClassName
type from the MyAssemblyName
assembly, which has a public key token with the value my-assembly-public-key-token
. If the type is correctly resolvable at runtime, it will be permitted to be used as a source for ObjectDataSource's data retrieval. This configuration element also allows to list custom types that are allowed in the report definition.
XML-based configuration file:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="Telerik.Reporting" type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting" allowLocation="true" allowDefinition="Everywhere" />
</configSections>
<Telerik.Reporting>
<TypeReferences>
<add typeName="MyNamespace.MyClassName" assemblyName="MyAssemblyName" publicKeyToken="my-assembly-public-key-token" />
</TypeReferences>
</Telerik.Reporting>
...
</configuration>
JSON-based configuration file:
"telerikReporting": {
"typeReferences": [
{
"typeName": "MyNamespace.MyClassName",
"assemblyName": "MyAssemblyName",
"publicKeyToken": "my-assembly-public-key-token"
}
]
}
When adding the
Telerik.Reporting
section manually, do not forget to register it inconfigSections
element of the configuration file. Failing to do so will result in a ConfigurationErrorsException with the following text: Configuration system failed to initialize.