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

Problem deploying trdx file with user defined function to the web

1 Answer 98 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Clinton Smyth
Top achievements
Rank 1
Clinton Smyth asked on 17 Oct 2015, 09:02 PM

Hi

I've created a simple report with the standalone designer and using a ReportViewer on a webpage, I'm able to view the report in the browser. Additionally, I've created an external assembly and I'm able to source data from it using an object data source (works fine in the browser too).

The problem comes in when I try to use a static method in the external assembly. I can see it and works fine in the standalone designer but I get the following error in the web page:

An error has occurred while processing TextBox 'textBox32': The expression contains object 'ReportDataSource' that is not defined in the current context.

 

The text box has the expression:

= ReportDataSource.MyReports.FormatCurrency(Fields.Currency, Fields.Amount, 2)

I've been through the article http://www.telerik.com/support/kb/reporting/report-designer/details/deploying-trdx-(xml-report-definition)-that-uses-external-assembly and made the recommended config changes in the web.config file but I still get the error. It appears this article is specific to desktop and not web applications.

How do I get my method visible in a web environment?

Thanks

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 21 Oct 2015, 01:26 PM
Hi Clinton,

The error indicates the function cannot be found - the external assembly is not loaded or the passed values are not of the types expected by the method's arguments.

The web application must be configured in a similar way as the Standalone Designer tool. After adding the configuration settings, make sure the external assembly is referenced in the web application and its CopyLocal is set to true in the VS Property grid.

To check if the fields values are of the expected types, change the custom functions signature to accept objects and add logging in the method.


If you need further help, please feel free to open a support ticket and send us a demo project that illustrates the settings and the problem.

Regards,
Stef
Telerik
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
Tags
Report Designer (standalone)
Asked by
Clinton Smyth
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or