No Report snapshots created in Dynamics CRM 2015



  • If you try to schedule a Report in Dynamics CRM 2015 that uses the FetchXML data source type, this is for example any report you can create using the Report Wizard you will notice there are no Report Snapshots created ever.


     

    Looking at the Reporting Services logs located at C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\LogFiles I found the following exception

    processing!WindowsService_0!1924!01/06/2016-15:40:35:: e ERROR: Failed to load expression host assembly. Details: Could not load file or assembly 'Microsoft.Crm.Reporting.RdlHelper, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Crm.Reporting.RdlHelper, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'Microsoft.Crm.Reporting.RdlHelper, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
    at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
    at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
    at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
    at System.Reflection.Assembly.Load(String assemblyString)
    at Microsoft.ReportingServices.RdlExpressions.ReportRuntime.ExpressionHostLoader.<>c__DisplayClass27.<LoadExprHostIntoCurrentAppDomain>b__25()
    at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.<>c__DisplayClass4.<RunFromRestrictedCasContext>b__3(Object state)
    at System.Security.SecurityContext.runTryCode(Object userData)
    at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
    at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
    at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.RunFromRestrictedCasContext(ContextBody callback)
    at Microsoft.ReportingServices.RdlExpressions.ReportRuntime.ExpressionHostLoader.LoadExprHostIntoCurrentAppDomain(Byte[] exprHostBytes, String exprHostAssemblyName, Evidence evidence, Boolean includeParameters, Boolean parametersOnly, OnDemandObjectModel objectModel, List`1 codeModules)
    at Microsoft.ReportingServices.RdlExpressions.ReportRuntime.LoadCompiledCode(IExpressionHostAssemblyHolder expressionHostAssemblyHolder, Boolean includeParameters, Boolean parametersOnly, ObjectModelImpl reportObjectModel, ReportRuntimeSetup runtimeSetup)

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

    The Solution

    Edit the ReportingServicesService.exe.config file that is located in the C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin folder

    And add the following lines right before the closing tag </assemblyBinding>

    <dependentAssembly>
    <assemblyIdentity name="Microsoft.Crm.Reporting.RdlHelper" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="5.0.0.0" newVersion="7.0.0.0" />
    <bindingRedirect oldVersion="6.0.0.0" newVersion="7.0.0.0" />
    </dependentAssembly>

     The file should look as follows where the new lines added are highlighted in yellow

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        ….
        ….
    <dependentAssembly>
    <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral" />
    <bindingRedirect oldVersion="10.0.0.0" newVersion="12.0.0.0" />
    <bindingRedirect oldVersion="11.0.0.0" newVersion="12.0.0.0" />
    </dependentAssembly>

    <dependentAssembly>
    <assemblyIdentity name="Microsoft.Crm.Reporting.RdlHelper" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="5.0.0.0" newVersion="7.0.0.0" />
    <bindingRedirect oldVersion="6.0.0.0" newVersion="7.0.0.0" />
    </dependentAssembly>

    </assemblyBinding>
    <gcServer enabled="true" />
    </runtime>
    <startup>
    <supportedRuntime version="v2.0.50727"/>
    </startup>
    </configuration>

    Save the file

    Restart the Reporting Services

    That's it, that should fix the problem



  • Comments



Add a Comment