AX/D365 SSRS Report: “: Error 1 : Format is invalid. “

Problem: When modifying a SSRS report I received the following error at compile time. “Error 1 : Format is invalid. InvalidIdentifier \SSRS Reports\Reports\[ReportName]”

Solution: It turns out if you copy and paste expressions with functions in them, Visual studio will create an expanded version of them with the full function namespace e.g.
=Format(Fields!MyDateTimeField.Value, “dd/MM/yyyy hh:mm:ss tt”)
becomes
=Microsoft.VisualBasic.Strings.Format(Fields!MyDateTimeField.Value, “dd/MM/yyyy hh:mm:ss tt”)

Simply removing this additional namespace seems to resolve the issue.

Hope my pain helps someone!