I'm trying to use a calculated field that I've added to my Dataset in Microsoft Report Builder launched from an AL extension built in Visual Studio Code.
I've added the Calculated field ("TimeInDays") OK, (Expression below):-
=iif(Fields!UnitOfMeasure.Value = "DAY", Fields!Quantity.Value, Fields!Quantity.Value * 7.5)
I've dragged it on to the body of the report, OK.
However, when I try and view the report in Business Central, I get the error below:
Rendering output for the report failed and the following error occurred: The Value expression for the text box ‘TimeInDays’ refers to the field ‘TimeInDays’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case.

Where am going wrong?