0

tengo el siguiente problema a la hora de cargar mi siguiente archivo ASPX con un ReportViewer Item adentro; He leido que puede ser referido a la version en el Assembly del encabezado del archivo aspx más no he encontrado como corregirlo

La clase base incluye el campo 'ReportViewer2', pero su tipo (Microsoft.Reporting.WebForms.ReportViewer) no es compatible con el tipo de control (Microsoft.Reporting.WebForms.ReportViewer).

Error de código fuente:


Línea 33:                                 <td class="TamCol3"></td>
Línea 34:                                  <td style="text-align: center;">                                  
Línea 35:                                       <rsweb:ReportViewer ID="ReportViewer2" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana"
Línea 36:                                             WaitMessageFont-Size="14pt" Width="100%" Height="750px"
Línea 37:                                             ShowBackButton="False" ShowCredentialPrompts="False" ShowDocumentMapButton="False" ShowFindControls="False"



ErrorImagen

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Reporte.aspx.cs" Inherits="WebApplication1.Reporte" %>
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>


             <asp:ScriptManager ID="Scriptmanager1" runat="server">

        </asp:ScriptManager>
        </div>

        <br />  
        <br />


            <div>

                <asp:UpdatePanel runat="server">
                    <ContentTemplate>

                        <table style="width:120%;margin:0 auto">
                            <tr>
                                <td class="TamCol3"></td>
                                 <td style="text-align: center;">                                  
                                      <rsweb:ReportViewer ID="ReportViewer2" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana"
                                            WaitMessageFont-Size="14pt" Width="100%" Height="750px"
                                            ShowBackButton="False" ShowCredentialPrompts="False" ShowDocumentMapButton="False" ShowFindControls="False"
                                            ShowZoomControl="False" 
                                            ToolBarItemBorderColor="White" 
                                            ToolBarItemBorderStyle="None" 
                                            BackColor="#F5F6F7" 
                                            BorderColor="Gray"
                                            ShowRefreshButton="false" 
                                            BorderStyle="None" 
                                            BorderWidth="1px" 
                                            DocumentMapWidth="100%">
                                            <LocalReport ReportPath="Report1.rdlc">
                                            </LocalReport>
                                      </rsweb:ReportViewer>
                                     </td>  
                            </tr>
                        </table>


                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
    </form>
</body>
</html>


Code Reporte.aspxcs [ No tengo nada implementado aún pero por si es requerido ]:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;
using System.Data;

namespace WebApplication1
{
    public partial class Reporte : System.Web.UI.Page
    {
        DataSet Dtset;
        protected void Page_Load(object sender, EventArgs e)
        {

        }


        void fMuestraReporte(String idSolicitud)
        {
            try
            {
                string sNomReporte = "RptVerTelefonica.rdlc";
                ReportDataSource Rd = new ReportDataSource();
                Dtset = new DataSet();
              //  Dtset = Session[]
            }
            catch (Exception)
            {

                throw;
            }
        }


    }
}
1
  • podrias fijarte si el ReportView que agregaste sea para web y no en WindowForm
    – PieroDev
    el 30 oct. 2019 a las 22:41

1 respuesta 1

0

Andres prueba ingresando en tu page aspx

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

y en tu Web.Config lo siguiente:

<compilation debug="true">

<assemblies>

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

<add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>

<buildProviders>

<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

</buildProviders>

</compilation>

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.