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

OutOfMemoryException

1 Answer 313 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marius
Top achievements
Rank 1
Marius asked on 10 Apr 2010, 03:28 AM
We occasionally get the following exception running a report on Telerik Reporting version 2.8.8.273. I know this is an older version. Any confirmation that this is resolved in the latest version or a workaround would be appreciated.

Exception:

System.OutOfMemoryException: Exception of type

'System.OutOfMemoryException' was thrown.

   at Telerik.Reporting.HtmlRendering.Matrix.LoadMatrix()

   at Telerik.Reporting.HtmlRendering.Matrix.Init()

   at Telerik.Reporting.HtmlRendering.Matrix..ctor(ReportItemBase

reportItem, Boolean renderDockedItems)

   at

Telerik.Reporting.HtmlRendering.Matrix.RenderDockedItem(HtmlRenderingCon

text context, Int32 itemIndex, DockState dockState)

   at

Telerik.Reporting.HtmlRendering.Matrix.RenderDockedItem(HtmlRenderingCon

text context, Int32 itemIndex, DockState dockState)

   at

Telerik.Reporting.HtmlRendering.Matrix.RenderDockedItem(HtmlRenderingCon

text context, Int32 itemIndex, DockState dockState)

   at

Telerik.Reporting.HtmlRendering.Matrix.RenderDockedItem(HtmlRenderingCon

text context, Int32 itemIndex, DockState dockState)

   at

Telerik.Reporting.HtmlRendering.Matrix.RenderDockedItem(HtmlRenderingCon

text context, Int32 itemIndex, DockState dockState)

   at Telerik.Reporting.HtmlRendering.Matrix.Render(HtmlRenderingContext

context)

   at

Telerik.Reporting.HtmlRendering.ReportSectionBaseRenderer.Render(ReportI

temBase item, HtmlRenderingContext context)

   at

Telerik.Reporting.HtmlRendering.HtmlItemRender.Telerik.Reporting.HtmlRen

dering.IReportItemRender.Render(ReportItemBase item, RenderingContext

context)

   at

Telerik.Reporting.HtmlRendering.RenderingContext.Render(ReportItemBase

item)

   at

Telerik.Reporting.HtmlRendering.HtmlPage.RenderBodyInternal(HtmlWriter

bodyWriter)

   at Telerik.Reporting.HtmlRendering.HtmlPage.Render(HtmlTextWriter

writer, HtmlRenderingContext renderingContext)

   at Telerik.Reporting.HtmlRendering.HtmlReport.Render(HtmlTextWriter

writer)

   at

Telerik.Reporting.HtmlRendering.HtmlRenderingExtension.Telerik.Reporting

.Processing.IRenderingExtension.Render(Report report, Hashtable

renderingContext, Hashtable deviceInfo, CreateStream

createStreamCallback, EvaluateHeaderFooterExpressions

evalHeaderFooterCallback)

   at Telerik.Reporting.Processing.ReportProcessor.Render(String format,

Report report, Hashtable deviceInfo, CreateStream createStreamCallback,

String& documentName)

   at Telerik.ReportViewer.WebForms.ServerReport.Render(HttpResponse

response, String format, Int32 pageIndex, Boolean refresh)

   at

Telerik.ReportViewer.WebForms.ReportPageOperation.PerformOperation(NameV

alueCollection urlQuery, HttpContext context)

   at

Telerik.ReportViewer.WebForms.HttpHandler.System.Web.IHttpHandler.Proces

sRequest(HttpContext context)

   at

System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpAppli

cation.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,

Boolean& completedSynchronously)


1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 14 Apr 2010, 03:21 PM
Hello Marius,

First keep in mind that handling large reports usually requires additional resources in terms of powerful CPUs, and enough memory to handle all the operations. As far as the processing time and consumed memory is concerned, the complexity of the report layout, the complexity of the data calculations (aggregates, conditional formatting),  the rendering media, the size of the generated document (in pages), and the capabilities of the underlying machine are crucial. So in this line of thoughts how many rows of data does this report is supposed to show and how many taken up RAM do you see in the task manager before it throws the exception?
As far as  performance is concerned we recommend to avoid using PageCount because it usually requires an additional pass to count all pages before the actual report rendering (i.e. it renders the report in the memory in order to count all pages). Another option is to reconsider the size of the data you need to display at once. In contrast to Grid controls, where usually a small subset of data records are displayed, the reporting engine usually needs all the data to layout the pages depending on the selected media (output format).
Please take a look at the following KB article (Performance Considerations) that lists several known culprits and suggestions to avoid them so that you can use our product seamlessly.
Also upgrading to the latest official release is highly recommended due to the various improvements and new features we have released (see release notes).

All the best,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Marius
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or