This is a migrated thread and some comments may be shown as answers.

Object reference not set to an instance of an object

2 Answers 529 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shonda
Top achievements
Rank 1
Shonda asked on 30 Nov 2011, 10:25 PM
I am getting an object reference error when trying to display my report. I get this error only after I upgrading to the latest version Q3 2011 (5.3.11.1116).  

With no code changes at all I can down grade to version Q2 2011 SP1 (5.1.11.928) and the report works just fine.

Here is the stack I receive in the Output window while debugging...

*** RenderReport #0 STARTED ***
An error has occurred while rendering the report: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Reporting.Processing.LayoutEngine.LayoutAnchoredItem(ILayoutItem item, RectangleU rect)
   at Telerik.Reporting.Processing.LayoutEngine.Layout(ILayoutContainer container)
   at Telerik.Reporting.Processing.ReportSectionBase.Measure(MeasureDirection dir, Graphics graphics)
   at Telerik.Reporting.Processing.PageSection.Measure(MeasureDirection dir, Graphics graphics)
   at Telerik.Reporting.Processing.ProcessingElement.MeasureElement(MeasureDirection dir, Graphics graphics)
   at Telerik.Reporting.Processing.Report.MeasureElement(ProcessingElement elementToMeasure)
   at Telerik.Reporting.Paging.InteractiveLayout.PageComposition.GetMaxPageSectionWidth()
   at Telerik.Reporting.Paging.PageCompositionBase.SetCurrentWidthCore()
   at Telerik.Reporting.Paging.PageCompositionBase.set_CurrentPageArea(PageArea value)
   at Telerik.Reporting.Paging.InteractiveLayout.PageComposition.PrepareNewPage()
   at Telerik.Reporting.Paging.InteractiveLayout.PageComposition.NextUsableArea()
   at Telerik.Reporting.Paging.InteractiveLayout.PageComposition.NextVerticalPage()
   at Telerik.Reporting.Paging.InteractiveLayout.PageComposition.PageOverride()
   at Telerik.Reporting.Paging.PagerBase.Page(IPageHandler handler, Report report)
   at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingInfo, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback)
*** RenderReport #0 DONE in 00:00:00.0302191 ***


WinViewer> An error has occurred while rendering a report:
The thread 'Rendering' (0x2ee0) has exited with code 0 (0x0).
System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Reporting.Processing.LayoutEngine.LayoutAnchoredItem(ILayoutItem item, RectangleU rect)
   at Telerik.Reporting.Processing.LayoutEngine.Layout(ILayoutContainer container)
   at Telerik.Reporting.Processing.ReportSectionBase.Measure(MeasureDirection dir, Graphics graphics)
   at Telerik.Reporting.Processing.PageSection.Measure(MeasureDirection dir, Graphics graphics)
   at Telerik.Reporting.Processing.ProcessingElement.MeasureElement(MeasureDirection dir, Graphics graphics)
   at Telerik.Reporting.Processing.Report.MeasureElement(ProcessingElement elementToMeasure)
   at Telerik.Reporting.Paging.InteractiveLayout.PageComposition.GetMaxPageSectionWidth()
   at Telerik.Reporting.Paging.PageCompositionBase.SetCurrentWidthCore()
   at Telerik.Reporting.Paging.PageCompositionBase.set_CurrentPageArea(PageArea value)
   at Telerik.Reporting.Paging.InteractiveLayout.PageComposition.PrepareNewPage()
   at Telerik.Reporting.Paging.InteractiveLayout.PageComposition.NextUsableArea()
   at Telerik.Reporting.Paging.InteractiveLayout.PageComposition.NextVerticalPage()
   at Telerik.Reporting.Paging.InteractiveLayout.PageComposition.PageOverride()
   at Telerik.Reporting.Paging.PagerBase.Page(IPageHandler handler, Report report)
   at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingInfo, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback)
   at Telerik.Reporting.Processing.ReportProcessor.RenderCore(String format, IList`1 reports, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback)
   at Telerik.ReportViewer.Common.ReportRenderer.Render(ReportRendererArgs args)

2 Answers, 1 is accepted

Sort by
0
Accepted
Hristo
Telerik team
answered on 02 Dec 2011, 08:36 AM
Hello Shonda,

As seen from the stack trace, the problem is with anchored/docked items placed in a page section. As page sections cannot grow, having docking or anchoring on items is not necessary, so we consider that you can safely remove anchoring from all your items in the page sections and your report would continue to work as expected.

Nevertheless we have addressed the problem in the latest internal build, available for download in your account.

Best wishes,
Hristo
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Shonda
Top achievements
Rank 1
answered on 02 Dec 2011, 04:00 PM
Thank you.
Tags
General Discussions
Asked by
Shonda
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Shonda
Top achievements
Rank 1
Share this question
or