Posts

Deploying Microsoft Report Viewer with ASP on a Hosted Site

The Microsoft Report Viewer is a handy way of producing reports without having to enter the Crystal Reports Quagmire, however deploying it within an ASP application to a Hosted environment can be quite involved as it may not be installed on your host system and it will usually not be possible to run the installer.

 

Instead doing the following worked for us:

 

Copy the following dlls to your project’s bin directory:

 

Microsoft.ReportViewer.Common.dll

Microsoft.ReportViewer.WebForms.dll

Microsoft.ReportViewer.WinForms.dll

Microsoft.ReportViewer.ProcessingObjectModel.dll

 

 

The first three will be easy to find on your development system – do a search, the last might only exist in you development system’s GAC, to get easy access to this use the subst command as follows to map it to a virtual drive:

 

Subst b: %windir%\assembly

 

This will map it to b:

 

Once the dlls have been copied into the bin folder, delete the existing GAC reference from your project to ‘Microsoft.ReportViewer.WebForms’, and add it again, this time by browsing to ‘Microsoft.ReportViewer.WebForms.dll’ in your bin folder.

 

Now when you publish… your app to your hosted site, the report viewer should work OK.