An error occurs when rendering to PDF from Reporting Services
I have a report in MS reporting services that renders just fine to the screen (when viewing the report through the reporting services web interface), but when I go to export that to a PDF it errors.
The following YSOD is shown when trying to access the report via web services, but the report errors when rendering to PDF from the reporting services web interface as well.
Any ideas on how I can track down what is causing this issue?
Server Error in '/****' Application.
--------------------------------------------------------------------------------
An error occurred during rendering of the report. ---> Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.NullReferenceException: 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.Web.Services.Protocols.SoapException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.NullReferenceException: 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:
[SoapException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.NullReferenceException: Object reference not set to an instance of an object.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431678
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
EZTrac.Infrastructure.Reporting.Services.Impl.ReportExecutionService.Render(String Format, String DeviceInfo, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds) in d:\TeamBuild\WorkingDirectory\Nightly Build\EZTrac.Infrastructure.Reporting\Services\Impl\ReportExecutionService.cs:827
EZTrac.Infrastructure.Reporting.Services.Impl.PaccarReportService.GetReport(IReport report) in d:\TeamBuild\WorkingDirectory\Nightly Build\EZTrac.Infrastructure.Reporting\Services\Impl\PaccarReportService.cs:75
EZTrac.Controllers.ReportController.GenerateReport(IReport report) in d:\TeamBuild\WorkingDirectory\Nightly Build\EZTrac\Controllers\ReportController.cs:181
EZTrac.Controllers.ReportController.GetReportFileStreamResult(ReportInputBase reportInput) in d:\TeamBuild\WorkingDirectory\Nightly Build\EZTrac\Controllers\ReportController.cs:174
EZTrac.Controllers.ReportController.DealerTransactionReportDownload(DealerTransactionForm form) in d:\TeamBuild\WorkingDirectory\Nightly Build\EZTrac\Controllers\ReportController.cs:78
lambda_method(ExecutionScope , ControllerBase , Object[] ) +85
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.Re开发者_StackOverflowflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +178
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +24
System.Web.Mvc.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7() +53
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +258
System.Web.Mvc.<>c__DisplayClassc.<InvokeActionMethodWithFilters>b__9() +20
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +258
System.Web.Mvc.<>c__DisplayClassc.<InvokeActionMethodWithFilters>b__9() +20
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +193
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +382
System.Web.Mvc.Controller.ExecuteCore() +123
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +23
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7
System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +144
System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +54
System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3053
EDIT
it looks like when the report is very large (not sure what the threshold is) then the PDF fails to render. (40+ PDF pages makes it error but not 5 or less for example).
It may be a good idea to try and look at the error logs on the server that renders the report. Look to see if there is something specific occurring with RS. Can you produce the report locally from Visual Studio into a PDF?
I've seen similar behavior before if it is actually timing out. Should this report take a bit of time to produce? What about exporting to other formats?
精彩评论