Article information
Article relates to
Telerik Reporting
Created by
Peter
Last modified
06 September 2013
Last modified by
HOW-TO How to use external assemblies with custom user functions in Telerik Report Designer
DESCRIPTION It is a common requirement to add your own User Functions or bind to custom CLR objects, data models (such as an OpenAccess ORM model), external assemblies with custom data source objects, data feeds (including OData), and web services.
In order to expose your data, so it can be utilized by the Object/OpenAccess/Entity data source components, or extend the default behavior of the Telerik Reporting engine with custom user functions, you have to use the AssemblyReferences Element of the Telerik.Reporting configuration section to reference your custom assembly:
SOLUTION Create an assembly with Custom User Functions
C#
public
static
class
MyClass
{
string
Greet(
name)
return
.Format(
"Hello, {0}"
, name);
}
VB.NET
Public
NotInheritable
Class
Shared
Function
Greet(name
As
String
)
Return
, name)
End
Once the assembly with our custom logic is built it should be placed in the folder or a subfolder of the Report Designer executable file. The default installation folder is C:\Program Files (x86)\Telerik\Reporting QX XXXX\Report Designer (C:\Program Files\Telerik\Reporting QX XXXX\Report Designer on 32 bit machines), where X XXXX stands for the release version and year, e.g Q1 2013.
<!-- Add assembly references -->
<!--
<
Telerik.Reporting
>
AssemblyReferences
add
name
=
"MyFunctions"
version
"1.0.0.0"
/>
</
-->
configuration
...
runtime
assemblyBinding
xmlns
"urn:schemas-microsoft-com:asm.v1"
probing
privatePath
"MySubDir; MySubDir\SubDir"
"MyAssembly"
Resources Buy Try