views:

771

answers:

1

I have a report in M$ 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.ReflectedActionDescriptor.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).

+4  A: 

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?

RSolberg
yup, this occurs locally on my dev machine, on test, and through the web services.
Jon Erickson
Do other export formats work or do they die as well?
RSolberg
If it is only PDF, do you have any special objects getting rendered onto the report? Has the report ever rendered to a PDF? What has changed since then if it has/
RSolberg
looks like this is occurring when the report trying to be rendered has a lot of pages 40+
Jon Erickson
Jon: I've produced RS reports to PDF with hundreds of pages. Are there any special controls on this report, 3rd party components, images?
RSolberg