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

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

2 Answers 134 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Paulo
Top achievements
Rank 1
Paulo asked on 27 Feb 2017, 10:30 AM

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 Answers, 1 is accepted

Sort by
0
Paulo
Top achievements
Rank 1
answered on 27 Feb 2017, 11:12 AM
I forgot to mention, this image is inside the PageHeader section
0
Stef
Telerik team
answered on 28 Feb 2017, 10:55 AM
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
Tags
Report Designer (standalone)
Asked by
Paulo
Top achievements
Rank 1
Answers by
Paulo
Top achievements
Rank 1
Stef
Telerik team
Share this question
or