Monday, March 21, 2016

SSRS Deploy Error - business logic incorrect format


Here's the error on deploy of an SSRS report from AX to the SSRS server:

Make sure that Microsoft Dynamics AX Business Intelligence Components are installed on the SQL Server Reporting machine and verify that SQL Server Reporting Services is configured correctly matching the report server configuration in the Microsoft Dynamics AX client. 
System.Web.Services.Protocols.SoapException: Error while loading code module: ‘xyzShipNotificationReport.BusinessLogic, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’. Details: Could not load file or assembly 'xyzShipNotificationReport.BusinessLogic, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
   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)

One cause for this error is that the report business logic Visual Studio project is set with a Build Platform target that differs from the SSRS server architecture.  Leaving it at 'Any CPU' is best.

This can happen because when working in the VS project, there is a warning that makes you think that it wants to see 'x86' as the build platform.  If you do that, the warning will go away, but later, when you go to deploy to SSRS, you may get the error above.

The Platform target is set on the Build tab of the project properties:

No comments:

Post a Comment