Error while export to pdf-Object reference not set to an instance of an object
Hello, I am getting error while rendering the report to pdf in SSRS 2008. This is happening randomly and sometimes I get this error. I have SQL Server 2008 SP1 installed in my system . I installed the cumulative update 1 for SP1 also but no luck. Every time when export to pdf fails, SSRS is creating the dump file in the logs. I have captured the log of this specific error. Please let me know if you have any idea about this. reportrendering!ReportServer_0-297!1ec4!03/30/2010-10:32:57:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report., ; Info: 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. at Microsoft.ReportingServices.Rendering.HPBProcessing.Paragraph.get_SpaceBefore() at Microsoft.ReportingServices.Rendering.RichText.LineBreaker.FlowParagraph(Paragraph paragraph, Directions direction, IntPtr hdc, Single dpiX, FontCache fontCache, FlowContext flowContext, Boolean keepLines, SizeF flowContextSize, Int32& contentOffset) at Microsoft.ReportingServices.Rendering.RichText.LineBreaker.Flow(TextBox textBox, IntPtr hdc, Single dpiX, FontCache fontCache, FlowContext flowContext, Boolean keepLines, Single& height) at Microsoft.ReportingServices.Rendering.RichText.LineBreaker.Flow(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Boolean keepLines, Single& height) at Microsoft.ReportingServices.Rendering.HPBProcessing.PageContext.PageContextCommon.MeasureTextBoxHeight(TextBox textBox, FlowContext flowContext) at Microsoft.ReportingServices.Rendering.HPBProcessing.TextBox.AddToPage(RPLWriter rplWriter, PageContext pageContext, Double pageLeft, Double pageTop, Double pageRight, Double pageBottom, RepeatState repeatState) at Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.AddToPage(RPLWriter rplWriter, PageContext pageContext, Double pageLeft, Double pageTop, Double pageRight, Double pageBottom, RepeatState repeatState) at Microsoft.ReportingServices.Rendering.HPBProcessing.Report.NextPage(RPLWriter rplWriter, Int32 page, Int32 totalPages) at Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.GetNextPage(RPLReport& rplReport) at Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer.Render(Report report, NameValueCollection deviceInfo, Hashtable renderProperties, CreateAndRegisterStream createAndRegisterStream) at Microsoft.ReportingServices.Rendering.ImageRenderer.RendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties, CreateAndRegisterStream createAndRegisterStream) --- End of inner exception stack trace --- at Microsoft.ReportingServices.Rendering.ImageRenderer.RendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties, CreateAndRegisterStream createAndRegisterStream) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderFromOdpSnapshot(IRenderingExtension newRenderer, String streamName, ProcessingContext pc, RenderingContext rc, GetResource getResourceCallback) --- End of inner exception stack trace ---library!ReportServer_0-297!1ec4!03/30/2010-10:33:03:: i INFO: Exception UnhandledReportRenderingException dumped to: C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\Logfiles flags= ReferencedMemory, AllThreads, SendToWatsonchunks!ReportServer_0-297!1ec4!03/30/2010-10:33:03:: w WARN: Rolling back shared chunk transaction for snapshot '7640212d-dd39-4fc1-aa8b-1ae78475fcb1', Permanent=False.library!ReportServer_0-297!1ec4!03/30/2010-10:33:03:: w WARN: 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.library!ReportServer_0-297!1ec4!03/30/2010-10:33:03:: Unhandled exception was caught: Microsoft.Reporting.WebForms.ReportServerException: An error occurred during rendering of the report. (rrRenderingError) ---> Microsoft.Reporting.WebForms.ReportServerException: For more information about this error navigate to the report server on the local server machine, or enable remote errors --- End of inner exception stack trace --- Thanks, Gaurav Mittal
March 31st, 2010 1:19am

Does anyone have idea about this????
Free Windows Admin Tool Kit Click here and download it now
March 31st, 2010 9:38am

Is the report too big? You can look at the execution timeouts on report level as well reportserver level also, sql timeouts Bose
March 31st, 2010 11:14am

The report is very small and takes only few seconds to execute...also this happens only when I select a specific criteria while running the report...Any idea?
Free Windows Admin Tool Kit Click here and download it now
March 31st, 2010 11:33am

Hi, Could you please install 2008 SP1 CU7 (http://support.microsoft.com/kb/979065/en-us) and see if tbis still occurs? If it does then please file a bug via https://connect.microsoft.com/SQLServer and attach the report that is causing this dump -- thanks! Best regards, Andre
March 31st, 2010 6:56pm

Hi There, I had the same issue, have just installed the above patch but it has not resolved the problem. Will log a bug. Cheers Lucas
Free Windows Admin Tool Kit Click here and download it now
June 1st, 2010 8:09pm

Didn't see any resolution to this. I'm currently using 2008 R2, CU7 and getting the same dump when exporting to PDF. Is there a fix for this?
September 8th, 2010 1:53pm

Gonna bump this thread one more time to see if anyone has anything as a solution or any words from MS? Thanks!
Free Windows Admin Tool Kit Click here and download it now
December 14th, 2010 8:37am

Anyone got a fix for this? Hard to believe anyone is using R2 without being able to print directly to a printer. For the companies I've worked at this makes 2008R2 useless. From what I see in other posts, there is not a work around.
April 14th, 2011 1:18pm

Hi, The issue with the call stack above has been fixed. Please install 2008 R2 CU6 (http://support.microsoft.com/kb/2489376) and see if you still hit an issue? If you do then please file a bug via https://connect.microsoft.com/SQLServer and attach the report that is causing this dump -- thanks! Best regards, Andre
Free Windows Admin Tool Kit Click here and download it now
April 14th, 2011 2:16pm

I am seeing this printing/PDF error with 2008 R2 SP1. Does anyone have a fix for it?
January 23rd, 2012 11:51am

We had quite a few instances of this problem, but upgrading to R2 Reporting Services fixed them all for us. It is something to do with the PDF rendering engine I am fairly sure which makes sense as it only occurs when exporting to PDF. We also found that the problem didn't occur when using the .Net report viewer control 2005 to render to PDF directly. My boss also swore that if you made sure the report gave absolutely no build warnings (IE "Over-lapping text boxes are not supported blah blah). No answers from me, but there's what I think I know about this very frustrating problem! LucasF
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2012 6:33am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics