2008-10-09 6 views
3

/ReportServer /를 통해 보고서에 액세스 할 때 모든 SSRS 기본 오류 페이지 (아래 그림)에 대해 다시 브랜드를 지정하고 오류 전자 메일을 보내고 싶습니다. 이미 ASP OnError 이벤트를 처리하고 있으며 기본 SSRS 오류 중 일부이 자체 예외를 catch 한 것으로 보이면이 페이지를 렌더링하여 OnError 이벤트가 실행되기 전에 응답을 모두 취소합니다.Reporting Services 2008의 사용자 지정 오류 페이지

모든 오류 페이지에 상표를 붙이기 위해 SSRS에 대한 처리 방법을 알려주십시오.

Reporting Services Error

답변

1

불행하게도, 당신은 SSRS의 시각적 측면을 사용하지 않을 때. SOAP 및 웹 서비스를 통해 보고서를 직접 사용할 수 있습니다.

1

나는 비슷한 문제가있어서 다음 해결책을 제시했다. 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; 
1

내가 SSRS2005이 솔루션을 개발 그리고 2008 아래 전에 권리를 추가, 2008R2 버전 reportviewer.aspx에서

입니다 </form>

<script type="text/javascript"> 
var rptDivString=document.getElementById('ReportViewerControl_ctl10_NonReportContent').innerHTML; 
//alert(rptDivString); 
var numPermError = rptDivString.search(/permissions/i); 
if (numPermError>0) 
{ 
var docTitle = document.title; 
var reportName = docTitle.substr(0,docTitle.length-16); 
alert('Reporting Services permissions error in report: ' + reportName); 
} 
</script>