This is a migrated thread and some comments may be shown as answers.

Custom user function not work

2 Answers 372 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Victor
Top achievements
Rank 1
Victor asked on 12 Nov 2016, 07:26 AM

Hello

when a .trdp file contains custom user function,error information see attached.

Telerik.Reporting.UriReportSource uriReportSource =new Telerik.Reporting.UriReportSource(); 
 uriReportSource.Uri = RootDir + "\\TestReport\\HomePage.trdp";
 Telerik.Reporting.Processing.RenderingResult result =reportProcessor.RenderReport("pdf", uriReportSource, deviceInfo);

2 Answers, 1 is accepted

Sort by
0
Accepted
Katia
Telerik team
answered on 14 Nov 2016, 10:33 AM
Hi Victor,

In order to use custom functions that reside in a separate assembly, the configuration file of the start project needs to have assemblyReferences element in Telerik.Reporting configuration section with the name of the assembly with user functions.

An example is provided in Extending Expressions help article. The changes need to be applied to the app.config/web.config file of the start project.

To preview the report that uses custom functions in Standalone Designer, the changes needs to be applied to Telerik.ReportDesigner.exe.config or Telerik.ReportDesigner.x86.exe.configExtending Report Designer.


Regards,
Katia
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Ian
Top achievements
Rank 1
commented on 17 Jul 2023, 08:10 PM

How do you do it with a .net core web designer?
Momchil
Telerik team
commented on 20 Jul 2023, 11:57 AM

Hello Ian,

To extend the Web Report Designer, you need to add the assemblyReferences element to the configuration file of the application that hosts the REST Service of the designer. In this case, the appsettings.json file.

The steps are described in the Web Report Designer - ObjectDataSource Wizard documentation article. This article is about extending the application with an assembly that contains an ObjectDataSource, but the configuration approach holds true when adding an assembly containing custom user functions.

Also, since you are working with a .NET Core application, make sure that your assembly targets at least .NET Standard 2.0. See the .NET Standard compatibility chart, for reference.

I hope this helps.

0
Victor
Top achievements
Rank 1
answered on 15 Nov 2016, 10:26 AM
Thank you very much
Tags
General Discussions
Asked by
Victor
Top achievements
Rank 1
Answers by
Katia
Telerik team
Victor
Top achievements
Rank 1
Share this question
or