2012-09-12 2 views
0

정상적으로 실행되면 올바른 데이터를 반환하지만 보고서 실행 서비스를 통해 실행하면 보고서에 데이터가 포함되지 않는다는 보고서가 있습니다. 필터링 할 ID가 포함 된 매개 변수를 전달합니다. 보고서에서 전송되는 것으로 확인할 수있는 레이블을 사용합니다.SSRS 2005 보고서 실행 서비스는 결과를 반환하지 않습니다.

ExecutionLogStorage 테이블을 보면 보고서가 rsSuccess의 상태로 실행되었지만 RowCount가 0임을 알 수 있습니다. 이벤트 로그 또는 보고서 서버 로그에는 오류가 없습니다.

public byte[] Render(ReportRequest rptRequest) 
    { 
     ReportExecutionService rs = new ReportExecutionService(); 

     rs.Credentials = CredentialCache.DefaultCredentials; 
     rs.Url = rptRequest.ReportExecutionServerEndPoint; 

     string reportPath = string.Format(
      "/{0}/{1}", 
      rptRequest.ReportDataBaseName, 
      rptRequest.ReportName); 

     string format = "PDF"; 

     string historyID = null; 
     string devInfo = 
      @"<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"; 

     string encoding; 
     string mimeType; 
     string extension; 
     Warning[] warnings; 
     string[] streamIDs; 

     ExecutionHeader execHeader = new ExecutionHeader(); 

     rs.ExecutionHeaderValue = execHeader; 
     rs.LoadReport(reportPath, historyID); 

     rs.SetExecutionParameters(rptRequest.ReportParameters, "en-us"); 

     return rs.Render(
      format, 
      devInfo, 
      out extension, 
      out encoding, 
      out mimeType, 
      out warnings, 
      out streamIDs); 
    } 

답변

1

가 배포되었을 때 코드가 다른 사용자 계정에서 실행중인 것을 밝혀 : 아래

우리가 PDF로 보고서를보고 할 때 사용하는 방법입니다. 해당 계정에 데이터를 읽을 수있는 권한이 없습니다.

관련 문제