Simple UserFunction from assembly not working

0 Answers 44 Views
Report Designer (standalone)
Top achievements
Rank 1
Chris asked on 24 May 2022, 11:53 PM | edited on 24 May 2022, 11:55 PM

I have the following VB.Net class library as a dll, containing the function with a given namespace:

Imports Telerik.Reporting.Expressions

Public Class ReportExtensions
    <[Function](Category:="Report Extended Functions", [Namespace]:="ReportExtensions", Description:="Returns a string that was given to the function")>
    Public Function TestFunc(str As String) As String
        Return str
    End Function
End Class


Here is the location of the dll:


And my config file:

<?xml version ="1.0"?>
			type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=, Culture=en-AU, PublicKeyToken=a9d7983dfcc261be"

			type="Telerik.ReportDesigner.Configuration.ReportDesignerConfigurationSection, Telerik.ReportDesigner.Configuration"

		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
		  <probing privatePath="path-to-the-assemblies"/>
			<!-- Required for interoperability with older versions of Telerik Reporting -->
			<assemblyIdentity name="Telerik.Reporting" culture="neutral" publicKeyToken="a9d7983dfcc261be"/>
			<bindingRedirect oldVersion="" newVersion=""/>
    <Telerik.ReportDesigner DefaultWorkingDir="Examples">

	<!-- Add assembly references -->
			<add name="ReportDesignerExtensions" version="" culture="en-AU" publicKeyToken="null" />


Here is a simple expression on a textbox on the Standalone Report Designer (also I cannot physically find my function declared in the editor window, I just have to type in the exact name):


The function should simply return "asd", but for some reason I see nothing when previewing the report. The textbox below works as expected.

What am I missing?

I've followed steps from Issue with User defined function in ReportViewer in Reporting | Telerik Forums and Preview report definition, which uses an external assembly with user-defined functions or CLR objects | Telerik Reporting, to no avail.

Telerik team
commented on 26 May 2022, 09:39 AM

Hi Chris,

The configuration seems correct to me. What's the framework and the version of the Class Library? Note that the Standalone Report Designer is a WPF application built against .NET Framework 4.0. For that reason, it cannot load and resolve classes from assemblies built against .NET Standard 2.1, .NET Core, .NET5 and .NET6. You can see the .NET Standard compatibility chart which explains how and when the assemblies can be loaded in different framework versions.

No answers yet. Maybe you can help?

Report Designer (standalone)
Asked by
Top achievements
Rank 1
Share this question