0
votes

I am working on an Asp.net MVC project in which I am also incorporating web forms for the purpose of showing a report. I created a new Report.aspx file and also installed the 2012 version of Microsoft Report Viewer control to use on my web form. After dragging the control out onto my web form, I get this error:

Error Creating Control - ReportViewer2Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

I have this in my Web.config also.

<assemblies>
 <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
    <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
 </assemblies>
1

1 Answers

0
votes

The report viewer is not part of asp.net but ships with Visual Studio.

The VS2012 version of the ReportViewer ships with version 11 of the viewer control. But the Control in your tool box is referencing version 10 which ships with VS2010.

You either

  1. have multiple versions of the viewer in different toolbox panels and you dragged the wrong toolbox control onto the aspx page or
  2. it's not installed at all and you just have an old reference to an older viewer.

You should just be able to update the toolbox with the version 11 control. The VS2012 control should be in : C:\Program Files (x86)\Microsoft Visual Studio 11.0\ReportViewer or similiar