2009-10-15 4 views
1

Reporting Services 2008에서 보고서를 PDF로 내보낼 때 오류가 발생했습니다.PDF Reporting Services에서 내보내기 문제

오류 메시지는 다음과 같습니다.

Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Exception: Object reference not set to an instance of an object.]

[Exception: An error occurred during rendering of the report.]

[Exception: An error occurred during rendering of the report.]
Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension) +520
Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +963
Microsoft.Reporting.WebForms.ServerReport.Render(String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +28
Microsoft.Reporting.WebForms.ServerModeSession.RenderReport(String format, Boolean allowInternalRenderers, String deviceInfo, NameValueCollection additionalParams, Boolean cacheSecondaryStreamsForHtml, String& mimeType, String& fileExtension) +85
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +150 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +183
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

그러나이 오류는 항상 그것은 단지 우리가 보고서의 매개 변수에서 사용하는 날짜에 따라, 여러 차례 발생,이 보고서에 표시되지 않습니다. Reporting Services가 처음이므로 문제를 일으킬 수있는 원인을 파악할 수있는 사람이 있습니까?

+0

보고서를 내보내는 방법은 무엇입니까? 당신의 코드에서? 또는보고 서비스 웹 인터페이스에서 또는보고에서? – Mozy

+0

내보내기 드롭 다운 상자에서 Reporting Services 웹 인터페이스에서 수동으로 내보내려고합니다. – Jezza69

답변

0

필자는이 사건의 원인이 무엇인지 알아 냈습니다. 내 보고서의 표 안에있는 필드 중 하나에 쉼표와 공백이 포함되어 있기 때문에 상황이 발생했습니다. 이러한 각 문자로 인해 '객체 참조 ...'예외가 발생합니다. 쉼표와 공백을 파이프 문자로 바꾸기 위해 보고서를 구동하는 저장된 proc에서 REPLACE 함수를 사용했습니다. 매우 훌륭한 해결책은 아니므로, 다른 사람들이이 문제에 대한 아이디어를 갖고 있는지 알고 싶습니다.

1

행 논리를 숨겨서이 오류가 발생합니다. 숨기기 행 논리가 테이블에 할당되지 않은 데이터 집합의 값을 참조했습니다. 내가 그 숨겨진 논리를 제거했을 때 그것은 괜찮 았어. 이를 해결하기 위해 테이블 ​​데이터 집합의 값만 사용하도록 hide 논리를 다르게 작성했습니다.

관련 문제