Adding Microsoft Report Viewer in Microsoft Visual Web Developer Express 2008

Posted in By waelouf 8 comments

If you want to use Microsoft Report viewer by the free version of Microsoft Visual Studio 2008 (Microsoft Visual Web Developer 2008), you cannot !!! because you will not find the reports tab in the toolbox, even you cannot add a new report because the reporting module is completely unavailable in this "Express" version, but I got a simple way to be able to host a report in your application.

First you will need to install Microsoft Report Viewer from here, once you download it you will have the Microsoft.ReportViewer DLLs in your GAC (Global Assembly Cash), next step is to get these DLLs from you GAC to can use it in your application as following:

1- Open your Command Propmpt and write:
CD C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms
If you run the command "dir" here you will find two folders




















These are the two versions of Report Viewer for both visual studio 2005 and 2008, 8.0.0.0 for VS 2005 and 9.0.0.0 for VS 2008.

Next step is to copy the required DLL (Whether 8.0.0.0 or 9.0.0.0 according to the version of web express you are using), then go inside the desired folder, and copy the dll to a destination (check the picture):



















Since you get the dll ... go copy and paste it in in your project, then add a new a new tab in your project, and make the reference to this dll inside the project


















One last step, in the web.config => (system.web/httpHandlers part) add:


add verb="*"
path="Reserved.ReportViewerWebControl.axd"
type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"


That's it ... I wish you good luck :)