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

5 posts, 0 answers
  1. Arthur
    Arthur avatar
    6 posts
    Member since:
    Nov 2014

    Posted 21 Jul 2017 Link to this post

    Hi

    I've got an issue with Conditional Formatting. I get "The expression contains object 'Fields' that is not defined in the current context".

    I've seen some errors on this forum with named fields not being defined, due to a a problem with the Data Source. But I really can't understand what's going on here. Obviously 'Fields' is defined as my TextBoxes are being populated, this error only shows up with Conditional Formatting.

    Please find the image attached for a better understanding.

    Could someone help me out?

    Thanks

  2. Arthur
    Arthur avatar
    6 posts
    Member since:
    Nov 2014

    Posted 24 Jul 2017 Link to this post

    No one?
  3. Yana
    Admin
    Yana avatar
    4888 posts

    Posted 26 Jul 2017 Link to this post

    Hi Arthur,

    Indeed, the error message indicates an issue with the textbox that has a conditional formatting rule, however it is not enough for us to find the exact reason for it.

    Please check the set conditional formatting rule and if expressions are written correctly with preceding '=' sign and if compound fields' names are surrounded by square brackets[].
    Also verify that the used fields are available in the used DataSource. If the fields come from a parent data scope, you can use ReportItem.DataObject.FiedName to get them.

    If this does not help, I'd ask you to send us the report with some test data, so we to be able to research the case further. Please open a support ticket and attach it there.

    Regards,
    Yana
    Progress 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
  4. David V
    David V avatar
    6 posts
    Member since:
    Oct 2012

    Posted 16 Aug in reply to Yana Link to this post

    I've seen this too, square brackets around the field does seem to solve the problem, but it was happening with fields that were NOT compound field names, in fact the report seems to be somewhat random because field names that differed by a single letter worked fine, change one letter in the field name and get the error that object Fields is not defined.

    I think this is an indication that there is still a bug, and I'm using 2019 version.

  5. Neli
    Admin
    Neli avatar
    121 posts

    Posted 21 Aug Link to this post

    Hi David,

    Basically, it is not necessary to use square brackets[] if the field is not compound. What actually do you mean with 'change one letter in the field name'?
    The error may occur when the textbox is not correctly bound to the datasouce or at some moment the expression syntax was not valid, which can lead to such error. 

    I suggest to open a Support ticket where you can send us the problematic report. Let us know if there are any specific instructions that we need to know in order to reproduce the error.

    Regards,
    Neli
    Progress 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