Problem deploying trdx file with user defined function to the web

2 posts, 0 answers
  1. Clinton Smyth
    Clinton Smyth avatar
    65 posts
    Member since:
    Apr 2007

    Posted 17 Oct 2015 Link to this post

    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

  2. Stef
    Admin
    Stef avatar
    3044 posts

    Posted 21 Oct 2015 Link to this post

    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
  3. DevCraft banner
Back to Top