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

User Defined Function support in Standalone designer

7 Answers 329 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 20 Aug 2013, 04:42 PM
When I try to reference a user defined function from TRDX file, and load it into my application, I get this error.

The expression contains object 'TSDFunctions' that is not defined in the current context.


This is the code that loads the TRDX file:


Dim settings As New XmlReaderSettings()
settings.IgnoreWhitespace = True
 
Dim reportBytes As Byte() = Nothing
 
' TODO - Need to change this code to use the input parameter reportTRDX once Telerik Report Designer allows more options for the dataset.
' ie: reportTRDX - "C:\Temp\TelerikReportingTest\Report1.trdx"
Using xmlReader As System.Xml.XmlReader = System.Xml.XmlReader.Create(reportTRDX, settings)
    Dim xmlSerializer As New Telerik.Reporting.XmlSerialization.ReportXmlSerializer()
 
    Dim report As Telerik.Reporting.Report = DirectCast(xmlSerializer.Deserialize(xmlReader), Telerik.Reporting.Report)
 
    reportBytes = GeneratePDF(report, dtData)
End Using
 
Return reportBytes

7 Answers, 1 is accepted

Sort by
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 23 Aug 2013, 07:40 AM
Hi!

Try this: http://www.telerik.com/help/reporting/configuring-telerik-reporting-assemblyreferences.html

I believe you will need to add assembly reference to the configuration. 
0
Peter
Top achievements
Rank 1
answered on 23 Aug 2013, 11:56 AM
Support referred me to this URL:

http://www.telerik.com/support/kb/reporting/customization-tip/how-to-use-external-assemblies-with-custom-user-functions-in-the-report-designer.aspx

In particular: Use the created XML report definition in a custom application

I had added the reference to the .config file for the standalone designer, but not to the web application where the TRDX files were being used.

0
ANTOINE
Top achievements
Rank 1
answered on 17 Jan 2014, 02:26 PM
Hi,

Sorry to digup this post, but have you succeded in referencing your user functions assembly? I followed these instruction and all I've got when launching the report viewer is what seems to be a broken interface with no report in it and no explicit error...
0
Stef
Telerik team
answered on 21 Jan 2014, 04:35 PM
Hi Antoine,

Please take a look at the Extending Report Designer help article and its related resources about custom user functions and external assemblies. Make sure the external assembly is built with the same Telerik Reporting version and is placed within the folder of the Standalone Designer executable.

If the issue still appears, enable the listener in the configuration file and post the error message here.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
Vittorio
Top achievements
Rank 1
answered on 13 Feb 2014, 01:39 AM
Hi, 

I have added a custom assembly in the folder of the Standalone Designer executable and I can use my custom function on designer, but when I run the preview I get "The expression contains undefined function call GetDateTime()" where GetDateTime is my custom function.

Regards,
Vittorio
0
Stef
Telerik team
answered on 13 Feb 2014, 04:26 PM
Hello Vittorio,

Please check if the passed parameters corresponds to the custom function signature - number, type and order. For more details, check our The expression contains undefined function call MyUserFunction() error KB article.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
Vittorio
Top achievements
Rank 1
answered on 13 Feb 2014, 05:54 PM
Thank you, now it work 

Best regarts
Vittorio
Tags
Report Designer (standalone)
Asked by
Peter
Top achievements
Rank 1
Answers by
Hadib Ahmabi
Top achievements
Rank 1
Peter
Top achievements
Rank 1
ANTOINE
Top achievements
Rank 1
Stef
Telerik team
Vittorio
Top achievements
Rank 1
Share this question
or