We always face a problem when we want to publish an application, we want to make sure not to make the customer go through Library installation & dll’s & ocx’s registration, the ideal scenario is to give the customer a portable application that does not need any configuration of course that is hard to achieve especially when you have databases that need servers but you can do that with small to medium sized applications.

error

error

Today i’m going to address a different problem i faced on one of the projects i’m working on currently. I thought of using report viewer included in visual studio 2008 & 2005 keeping away from crystal reports, thinking that microsoft report viewer is included in the .net framework which turned out to be wrong.

Microsoft includes the pack for this as a standalone installation found here:

Microsoft Report Viewer Redistributable 2005 Service Pack 1:

http://www.microsoft.com/downloads/details.aspx?FamilyID=82833F27-081D-4B72-83EF-2836360A904D&displaylang=en

Microsoft Report Viewer Redistributable 2008 Service Pack 1:

http://www.microsoft.com/downloadS/details.aspx?familyid=BB196D5D-76C2-4A0E-9458-267D22B6AAC6&displaylang=en

Next use any of your zip extraction program to extract the ReportViewer.exe

You will see a CAB file named vb_ros.cab also extract it.

————————————————————————————————————————————–

Then do as following:

  1. Rename: FL_Microsoft_ReportViewer_Common_dll_117718_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 To Microsoft.ReportViewer.Common.dll
  2. Rename: FL_Microsoft_ReportViewer_ProcessingObject_125592_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 To Microsoft.ReportViewer.ProcessingObjectModel.dll
  3. Rename: FL_Microsoft_ReportViewer_WebForms_dll_117720_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 To Microsoft.ReportViewer.WebForms.dll
  4. Rename: FL_Microsoft_ReportViewer_WinForms_dll_117722_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 To Microsoft.ReportViewer.WinForms.dll

Now go to your project.

copy paste the renamed dlls, next to your exe file for exapmple “Myproject\bin\..”

now right click on your project, press properties.

go to references tab

press add -> reference -> browse -> choose the 4 dll’s

That’s it, now your project can work as a portable standalone project with report viewer support.

Thank you for reading.

Please check the youtube video if you like a more step by step tutorial