I have an aspx page with a report viewer on it that is not rendering a report. The report does render in the report designer. When I test it in debug mode it does not stop on the Page_Load sub as expected. The code is short, so I've included it:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="RptViewer.aspx.vb" Inherits="RptViewer" %>
<%@ Register assembly="Telerik.ReportViewer.WebForms, Version=4.2.10.1221, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>telerik Report Viewer</title>
<style type="text/css">
html#html, body#body, form#form1, div#content, center#center
{
border: 0px solid black;
padding: 0px;
margin: 0px;
height: 100%;
}
</style>
</head>
<body id="body">
<form id="form1" runat="server">
<div id="content"><center id="center"><telerik:ReportViewer ID="ReportViewer1"
runat="server" style="border:1px solid #ccc;"
width="99%" height="99%" Skin="WebBlue"/></center></div>
</form>
</body>
</html>
The codebehind:
Imports System
Imports System.Web.UI
Imports Telerik.Reporting
Imports Reports
Partial Class RptViewer
Inherits System.Web.UI.Page
Protected Sub Page_load(ByVal sender As Object, ByVal e As EventArgs)
If Not IsPostBack Then
Dim rpt As New PDS
Me.ReportViewer1.Report = rpt
End If
End Sub
End Class
Thank you
Ron
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="RptViewer.aspx.vb" Inherits="RptViewer" %>
<%@ Register assembly="Telerik.ReportViewer.WebForms, Version=4.2.10.1221, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>telerik Report Viewer</title>
<style type="text/css">
html#html, body#body, form#form1, div#content, center#center
{
border: 0px solid black;
padding: 0px;
margin: 0px;
height: 100%;
}
</style>
</head>
<body id="body">
<form id="form1" runat="server">
<div id="content"><center id="center"><telerik:ReportViewer ID="ReportViewer1"
runat="server" style="border:1px solid #ccc;"
width="99%" height="99%" Skin="WebBlue"/></center></div>
</form>
</body>
</html>
The codebehind:
Imports System
Imports System.Web.UI
Imports Telerik.Reporting
Imports Reports
Partial Class RptViewer
Inherits System.Web.UI.Page
Protected Sub Page_load(ByVal sender As Object, ByVal e As EventArgs)
If Not IsPostBack Then
Dim rpt As New PDS
Me.ReportViewer1.Report = rpt
End If
End Sub
End Class
Thank you
Ron