SYMPTOM:
After creating an XQuery or Freeform SQL report in 9.4.1, when going back to edit the report and trying to change the attribute type the changes will not save. For instance, in the example below, the attribute type of 'City' is Text.

After changing the this from Text to Number, saving and closing the report, upon opening the report the Type will revert back to Text.
CAUSE:
This is working as designed. When creating a XQuery or Freeform SQL report, when adding a new attribute form that is not mapped to an existing attribute, a managed object is created. Once a user selects 'OK' from this editor, the managed object is created with that name. After the report is executed or the XQuery/Freeform SQL editor is opened a user will not be able to change that type. If the attribute is deleted from the report and recreated again, the name is still retained and managed by the system. This is why creating a new attribute here will always revert back to the original type that was part of its definition.
ACTION:
Follow the steps below to resolve this issue:
For questions on unused managed objects, refer to the following technical note:
TN: 13230 -What is Deleting Unused Managed Objects in Strategy Desktop 8.x?