Not defined in the current context...

8 posts, 1 answers
  1. Geoff
    Geoff avatar
    28 posts
    Member since:
    Jul 2010

    Posted 25 Nov 2011 Link to this post

    Hi there

    We have a simple report that works fine when tested in the development environment but when we publish it we get a red error box on every databound field saying....

    'The expression contains object <field_name> that is not defined in the current context'

    What is strange is we have dozens of other reports in the same library that all work fine.

    Can anybody point me at what we are doing wrong as I am struggling to understand why this report fails when it is published.

    We are using Q1 20111.

    Any help greatly appreciated.


  2. Answer
    Steve
    Admin
    Steve avatar
    10940 posts

    Posted 25 Nov 2011 Link to this post

    Hello Geoff,

    The error 'The expression contains object <field_name> that is not defined in the current context' means that the reporting engine cannot find such field in your database. Since it is working on your dev machine, most likely the report cannot connect to data i.e. either the database used as data source for this report does not exist on your server or the specified connectionString is not valid. Make sure that the connectionString you've saved in the app.config of the class library holding the reports exists in the configuration file in your actual application.

    All the best,
    Steve
    the Telerik team

    Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

  3. Geoff
    Geoff avatar
    28 posts
    Member since:
    Jul 2010

    Posted 25 Nov 2011 Link to this post

    Thank you Steve - problem solved.

    Was a connection string problem.

    Many thanks for your quick reply.

    All the best

    Geoff
  4. Alejandro
    Alejandro avatar
    2 posts
    Member since:
    Feb 2013

    Posted 12 Feb 2015 Link to this post

    Hola.

    Mi problema es que tengo diseñado un Telerik Report con el diseñador Q3 2012, en el cual uso funciones de usuarios, en el preview del diseñador sale bien, ya en la aplicación (Web Form) cuando visualizo el reporte me da error en textBox que llama a la función, cómo resuelvo esto. Un Saludo.
  5. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 13 Feb 2015 Link to this post

    Hi Alejandro,

    The official language used for our correspondence and in forums is English, so we would appreciate if you continue this discussion in English.

    On your question, check if the values passed to the user function corresponds to its signature - The expression contains undefined function call MyUserFunction() error. Also if user functions are built in an external assembly, the start project must be configured with the steps from Deploying trdx (XML report definition) that uses external assembly.

    If you need further help, please elaborate on the settings in your report and the created user function.

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Alejandro
    Alejandro avatar
    2 posts
    Member since:
    Feb 2013

    Posted 13 Feb 2015 in reply to Stef Link to this post

    Hi, Thank by Answer me, sorry my English is poor. I Fixed the problem, Only add configuration of Designer in web.config in my app and  myCustomFunctions.dll in bin directory and WALA!!!!



  7. William
    William avatar
    2 posts
    Member since:
    Mar 2015

    Posted 13 May 2015 in reply to Steve Link to this post

    Hi Steve! I am getting the same error with telerik reporting for asp.net 2.0!

    Well basically we use telerik reporting to produce some 32 pages profiles (reports) , and every once in a while I am getting the error like the one above printed in the last pages of our document. So this error happens randomly and I was wondering if you guys have a solution to mitigate this error. Is the a way I can detect this error in my VB code, to redo the report (this usually rectifies the error) before publishing it? 

     

    Thanks in advance!

     

    Will

     

     

  8. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 14 May 2015 Link to this post

    Hi Will,

    The error indicates that you are using fields not existing in the currently loaded data.

    Please download and install the latest available Telerik Reporting Q1 2015 Sp1 internal build v9.0.15.422 from your Telerik account - Products & Subscriptions - Latest internal builds - Reporting. Then run the Upgrade Wizard in all projects having referencees to Telerik Reporting.

    If the problem still occurs, please use your support ticket on the same question to send us the problematic report's definition.

    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
Back to Top