Just posting this here for others… I lost 2 days on this!
My PO report was crashing randomly with this error:
The expression referenced a non-existing field in the fields collection.
Nothing to track it down in the System Monitor.
SSRS log file gave a clue though that it was something to do with hiding a row:
Microsoft.ReportingServices.RdlExpressions.ReportRuntime.EvaluateStartHiddenExpression(Visibility visibility, IVisibilityHiddenExprHost hiddenExprHostRI, ObjectType objectType, String objectName)
I chased down a ton of red herrings, found that the report only crashed if:
- There was only 1 PO line
- The one line broke across into 2 pages
Issue was (apparently, to my best guess) that I had:
- A row in the tablix as part of the main PO group
- Visibility of that row was driven by a field in the group (correctly)
=Field(RFQ_c).Value - But if that row split into 2 pages, and there was only 1 row in the group, for some reason the ssrs rendering engine was losing the field.
- It did not crash if the hidden row was on page 2, that wasn’t the problem. Only if the PO line row above it (tablix subgroup) split across 2 pages.
Fix was to just use First(Fieldname) inside the visibility expression.
=First(Fields!RFQ_c.Value, "POHeader")
2 days gone… ![]()