Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve reportviewer from VS2010 to VS2015

I 've searched the answer and trial for half day. I am using VS2015 and MS SQL SERVER 2008 R2 that the project was develop in VS2010.

however, the error appears,

ASP.NET runtime error: The base class includes the field 'ReportViewer1', but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer). please modify the associated registration that is causing ambiguity and pick a new tag prefix

I cannot find reportViewer.Webfor.dll v12.0.0.0. I've done the following steps/procedures , ReportViewer is still invalid:
Thanks for helping!!

  1. install reportViewer 2015 runtime, Report Viewer 2010 Redistributable Package
  2. install SQL server data tool 2015
  3. in .aspx,

    <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, 
    Culture=neutral, PublicKeyToken=89845dcd8080cc91" 
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
    
  4. in web.config,

    <handlers>   
        <add name="ReportViewerWebControlHandler" preCondition="integratedMode"
        verb="*" path="Reserved.ReportViewerWebControl.axd"
        type="Microsoft.Reporting.WebForms.HttpHandler,
        Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral,
        PublicKeyToken=89845dcd8080cc91"/> 
    </handlers>
    
like image 238
john chan Avatar asked Sep 12 '15 14:09

john chan


1 Answers

I solve my problem. you have to delete all old version V10 and add new version v12 of 4 reportviewer.dll.
the path is C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common
second, we need to copy those 4 .dll and paste into bin folder in your project.
Then you can perfectly run your reportviewer

like image 197
john chan Avatar answered Nov 05 '22 10:11

john chan