Vignesh Kumar

Vignesh Kumar

  • NA
  • 1k
  • 416.5k

Unable to report viewer

Oct 7 2016 2:16 AM
Hi,
 



I am unable to see report viewer control in UI post button click and also in aspx I am getting the below error message in design view.

Error Creating Control - ReportViewer1Failed to create designer 'Microsoft.Reporting.WebForms.ReportViewer, Microsoft.ReportViewer.WebForms,

Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

ASPX:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExportReportToPDF.aspx.cs"

Inherits="ExportReportss.ExportReportToPDF" EnableEventValidation="false" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral,

PublicKeyToken=b03f5f7f11d50a3a"

Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title></title>

</head>

<body>

<form id="form1" runat="server">

<br />

<div>

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

</asp:ScriptManager>

<asp:Button ID="btnGetReport" runat="server" Text="GetReport" OnClick="btnGetReport_Click" />

<rsweb:ReportViewer ID="ReportViewer1" runat="server">

</rsweb:ReportViewer>

</div>

</form>

</body>

</html>

Code Behind:

public partial class ExportReportToPDF : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void btnGetReport_Click(object sender, EventArgs e)

{

try

{

ReportViewer1.ProcessingMode = ProcessingMode.Remote;

ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://Modile/Reports");

ReportViewer1.ServerReport.Refresh();

}

catch (Exception ex)

{

}

}

}

In web.config file I have added the below lines under system.webServer tag

<handlers>

<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" />

</handlers>

I don't have access to the URL (http://Modile/Reports) I am using here and not sure if that is the issue. Can anyone help me this one?

 

Answers (2)