"'Fields' is not defined in the current context" error previewing in Designer

3 posts, 0 answers
  1. Paulo
    Paulo avatar
    9 posts
    Member since:
    May 2016

    Posted 27 Feb 2017 Link to this post

    When i preview a report in the Designer I get an error in a PictureBox that has some conditional formatting depending on the values from the Datasource (see attach).

    It's weird because if i render this report to pdf, I get no errors (I just supply parameters to the report, I dont set any datasources).

    How can I fix this in the designer?

  2. Paulo
    Paulo avatar
    9 posts
    Member since:
    May 2016

    Posted 27 Feb 2017 in reply to Paulo Link to this post

    I forgot to mention, this image is inside the PageHeader section
  3. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 28 Feb 2017 Link to this post

    Hello Paulo,

    When page sections are processed, data is not available and fields should not be used in expressions - Report Structure and Understanding Rendering Behaviors.
    Instead you can use the PageExec function and the data available on the current physical page by specifying the Name of an item on the page as data scope.

    If you need further help, please elaborate on the scenario and the expressions used in page sections.

    Regards,
    Stef
    Telerik by Progress
    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