Hello,
Currently we are attempting to use the Web Report Viewer in our MVC4 project, and have run into some issues running on the IE9 Browser. When using Chrome or another browser, the viewer renders the report with no issues. Currently the aspx partial view that holds the viewer is being served up by a regular MVC controller.
Here is the error I receive when running the viewer in IE:
Unhandled exception at line 561, column 13 in script block
0x800a138f - Microsoft JScript runtime error: Unable to get value of the property 'ErrorMessage': object is null or undefined
this is coming from the ReportViewer javascript code, where it makes the function call and contentWindow is null:
Here is the code for my ReportViewer.aspx:
Currently we are attempting to use the Web Report Viewer in our MVC4 project, and have run into some issues running on the IE9 Browser. When using Chrome or another browser, the viewer renders the report with no issues. Currently the aspx partial view that holds the viewer is being served up by a regular MVC controller.
Here is the error I receive when running the viewer in IE:
Unhandled exception at line 561, column 13 in script block
0x800a138f - Microsoft JScript runtime error: Unable to get value of the property 'ErrorMessage': object is null or undefined
I've searched extensively for a solution to this issue with no luck... someone from the Telerik team please help!
I've also put my code snippets below:
I've also put my code snippets below:
this is coming from the ReportViewer javascript code, where it makes the function call and contentWindow is null:
ReportViewer.prototype.GetError =
function
()
{
var
paramsArea = document.getElementById(
this
.paramsFrameID);
var
msg =
""
;
if
(paramsArea){ msg = paramsArea.contentWindow.ErrorMessage; }
if
(!msg) {
var
reportFrame = document.getElementById(
this
.reportFrameID);
if
(reportFrame) { msg = reportFrame.contentWindow.ErrorMessage; }
return
this
.LocalizeMessage(msg);
}
Here is the code for my ReportViewer.aspx:
<%@ Page Language=
"C#"
Inherits=
"System.Web.Mvc.ViewPage<dynamic>"
%>
<%@ Register Assembly=
"Telerik.ReportViewer.WebForms, Version=6.1.12.820, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
Namespace=
"Telerik.ReportViewer.WebForms"
TagPrefix=
"telerik"
%>
<%@ Register Assembly=
"Telerik.Reporting, Version=6.1.12.820, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
Namespace=
"Telerik.Reporting"
TagPrefix=
"telerik"
%><br><%@ Import Namespace=
"System.Web.Mvc"
%>
<%@ Import Namespace=
"System.Data"
%>
<head runat=
"server"
>
<title></title>
</head>
<form id=
"main"
runat=
"server"
method=
"post"
action=
"#"
>
<telerik:ReportViewer ID=
"ReportViewer1"
runat=
"server"
style=
"width: 790px; height: 800px;"
>
</telerik:ReportViewer>
</form>
<script runat=
"server"
>
public override void VerifyRenderingInServerForm(Control control)
{
//base.VerifyRenderingInServerForm(control);
// to avoid the server form (<form id="Form2" runat="server">) requirement
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
ReportViewer1.ReportSource = new QuoteRpt();
var name = "QuoteReport"
ReportViewer1.ReportSource.Parameters.Add(new Telerik.Reporting.Parameter("QuoteId", ViewBag.QuoteID));
}
</script>