Symptoms
You run Report Manager in Microsoft SQL Server 2008. When you try to use Microsoft SQL Server Analysis Services as a data source for a data-driven subscription, you receive the following error message:

The dataset cannot be generated. An error occurred while connecting to a data source, or the query is not valid for the data source. (rsCannotPrepareQuery) Get Online Help The type initializer for ‘module’ threw an exception.The C++ module failed to load while attempting to initialize the default appdomain.Access is denied. (Exception from HRESULT: 0×80070005 (E_ACCESSDENIED))
Resolution
This problem occurs if SQL Server Analysis Services is not installed in the location that is expected by the SQL Server Reporting Services service.