나는 비슷한 문제가있어서 다음 해결책을 제시했다. Microsoft가이 특정 방법을 변경하면 문제를 일으키는 경향이 있습니다. 다음 코드는 페이지 머리글에 추가되어 ReportViewer JavaScript가로드 된 후 RSClientController 인스턴스가 만들어지기 전에 실행되도록합니다.
// This replaces a method in the ReportViewer javascript. If Microsoft updates
// this particular method, it may cause problems, but that is unlikely to
// happen.The purpose of this is to redirect the user to the error page when
// an error occurs. The ReportViewer.ReportError event is not (always?) raised
// for Remote Async reports
function OnReportFrameLoaded() {
this.m_reportLoaded = true;
this.ShowWaitFrame(false);
if (this.IsAsync)
{
if(this.m_reportObject == null)
{
window.location =
'<%= HttpRuntime.AppDomainAppVirtualPath %>/Error.aspx';
}
else
{
this.m_reportObject.OnFrameVisible();
}
}
}
RSClientController.prototype.OnReportFrameLoaded = OnReportFrameLoaded;
은 Microsoft의 ReportViewer 스크립트 파일에서 원본 코드합니다 (Microsoft.ReportViewer.WebForms, 8.0.0.0 내부는 닷넷 프레임 워크 3.5 SP1)입니다 :
function OnReportFrameLoaded()
{
this.m_reportLoaded = true;
this.ShowWaitFrame(false);
if (this.IsAsync && this.m_reportObject != null)
this.m_reportObject.OnFrameVisible();
}
RSClientController.prototype.OnReportFrameLoaded = OnReportFrameLoaded;