2009-10-15 2 views
1

Я столкнулся с ошибкой при экспорте отчета в PDF в Reporting Services 2008.Проблема с экспортом 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

Я понял, что вызвало это (в моем случае.) Это происходило, потому что одно из полей в сетке моего отчета содержало запятые и пробелы. Каждый из этих символов вызвал опасное исключение «ссылка на объект ...». Я использовал функцию REPLACE в сохраненном proc, который приводит отчет для замены запятых и пробелов символом pipe. Это не очень изящное решение, поэтому мне было бы интересно услышать, есть ли у кого-нибудь идеи вокруг этой проблемы.

1

Скрыть логику строки вызвать эту ошибку. Логика строки скрыть ссылалась на значение из набора данных, который не присваивается таблице. Когда я удалил эту скрытую логику, она экспортировала штраф. Чтобы решить эту проблему, я просто написал логику скрытия, чтобы использовать только значения из набора данных таблиц.

Смежные вопросы