Scheduled reports problem in CRM

After scheduling report in CRM UI you may still get error with next message:

The selected report is not ready for viewing. The report is still being created or a report snapshot is not available.

If check that report in SSRS directly, we can see that 'Report History' tab is actually empty. Even though related jobs in SQL Server Agent (named as random guids) run successfully.
In SSRS logs we may find culprit that doesn't let reports to be generated successfully on schedule:

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)

One option is to change references to assembly directly in RDL file. But since all reports work fine in UI it doesn't look like a proper solution.
It turned out that Dynamics CRM 2015 Reporting Extensions modifies SSRS web.config and configures assembly redirection from previous version to current (7.0.0.0).
In order to fix it you need also manually modify ReportingServicesService.exe.config in C:\Program Files\Microsoft SQL Server<ssrs-instance-name>\Reporting Services\ReportServer\bin\ folder. Add next lines in assemblyBinding section:

      <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>

Restart service and that's it. It will just work fine. Looks like a bug in reporting extensions installer.

Show Comments