Thursday 22 January 2015

Upgrade SSRS reports from Dynamics AX 2012 R2 to AX 2012 R3

Upgrade from Dynamics AX 2012 R2 to Dynamics AX 2012 R3 is really painful and we face many challenges and errors. I got following error when I tried to deploy some modified report which upgrade to R3:


Error      Message (4:25:24 pm) An error occurred while deploying the report PurchPurchaseOrder. 
This might be because the SQL Server Reporting Services extensions have not been installed on the report server, or configuration information has not been entered in the Report Servers form in Microsoft Dynamics AX.

Error      Message (4:25:24 pm) System.Web.Services.Protocols.SoapException: Error while loading code module: ‘Microsoft.Dynamics.Framework.Metadata.AX, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’. Details: Could not load file or assembly 'Microsoft.Dynamics.Framework.Metadata.AX, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
   at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
   at Microsoft.ReportingServices.WebServer.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)

Info        Message (4:25:24 pm) Report name: PurchPurchaseOrder
Design names: PurchPurchaseOrder.Report
Deployment status for design names: Error
Assembly names: PurchPurchaseOrder.BusinessLogic.dll, DrillThroughCommon.dll
Deployment status for assembly names: Success, Success

One solution if this error is to open respective VS report project in VS environment and build it and deploy it. But in some cases its not working. 
So the other workaround is to hack the code, you should export the report which throw above error, and open the XPO in notepad and search the tag 6.2.0.0 and replace it with 6.3.0.0 and import.
Here is the sample:
#
#    Microsoft.Dynamics.Framework.Reports, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
#    Microsoft.Dynamics.Framework.Metadata.AX, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

to replace with:

#
#    Microsoft.Dynamics.Framework.Reports, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
#    Microsoft.Dynamics.Framework.Metadata.AX, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

3 comments:

  1. Thank you very much! It helped me solving the same issue from an upgrade AX 2012 R2 to AX 2012 R3. Greeting!

    ReplyDelete
  2. Thanks a lot for sharing such valuable time saving information.

    ReplyDelete