This article provides a solution for the following error that may appear in AX 2012 when trying to run a report:
Error executing code: Wrong type of argument for conversion function
In addition, this article also provides a solution for the following error:
RegisterOverrideMethod was called twice for the same object for method ’Clicked’. You can only override a method once per instance.
This message appears if you try to run the Clicked method more than once. This can happen if you add the same record to the system twice.
An example of this would be if you add a control more than once to a dialog for a report or if you add the Lasernet button to the same Journal more than once. In this case, apply the following steps:
1. Check your dialog setup on the report, the reprint in forms, and the dialog setup on your reprint in forms.
2. Eliminate any duplications.
3. Confirm that the report runs without an error message.
This issue is frequently seen on the SalesInvoice and FreeTextInvoice reports.