title: ReportViewer 9.0 and Visual Studio 2010
body: <p>I am making an application to make Reports using visual studio 2010. Due to old ajax already used in the website, we can not use ReportViewer 10.0. So I am using Report Viewer 9.0 to generate reports.</p>
  
  <p>When I run the Application I am getting the following error:</p>
  
  <blockquote>
    <p>An error occurred during local report processing.<br>
    The definition of the report 'Main Report' is invalid.<br>
    The report definition is not valid. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded. </p>
  </blockquote>
  
  <p>I have changed the 10.0 ReportViewer references with the 9.0 one's. My web.config is as follows:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
       &lt;system.web&gt;
  
      &lt;httpHandlers&gt;
            &lt;!--&lt;add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" /&gt;--&gt;
            &lt;add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;
      &lt;/httpHandlers&gt;
      &lt;compilation debug="true" targetFramework="4.0"&gt;
        &lt;buildProviders&gt;
           &lt;!--&lt;add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;--&gt;
         &lt;add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/&gt;
        &lt;/buildProviders&gt;
      &lt;/compilation&gt;
    &lt;/system.web&gt;
  
    &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;handlers&gt;
        &lt;!--&lt;add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;--&gt;
        &lt;add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/&gt;
      &lt;/handlers&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>And my Page's code is as follows:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;
  &lt;%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;%--&lt;%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %&gt;--%&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
      &lt;rsweb:ReportViewer ID="rs" runat="server" Font-Names="Verdana" Font-Size="8pt" 
              InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana" 
              WaitMessageFont-Size="14pt"&gt;
          &lt;LocalReport ReportPath="Report.rdlc"&gt;
              &lt;DataSources&gt;
                  &lt;rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="DataSet1" /&gt;
              &lt;/DataSources&gt;
          &lt;/LocalReport&gt;
          &lt;/rsweb:ReportViewer&gt;
          &lt;asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
              SelectMethod="GetData" TypeName="dtAuditTableAdapters.ADT_AuditTableAdapter"&gt;
          &lt;/asp:ObjectDataSource&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Need solution for below error:</p>
  
  <blockquote>
    <p>An error occurred during local report processing.<br>
    The definition of the report 'Main Report' is invalid.<br>
    The report definition is not valid. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded. </p>
  </blockquote>