Hi Guys,
As per the title is that funciton thread save? When I'm calling this in a multi threaded app I get an exception on the rendering although all variables are declared locally. So my guess would be that it is not?
Stack Trace JIC:
------------------------------------------------------------------------------------------------------------
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Telerik.Reporting.Processing.Common.FontContainer.GetFontDef(String fontName, FontStyle fontStyle)
at Telerik.Reporting.Processing.Common.FontContainer.FillBuffer(Font gdiFont, Byte[]& buffer)
at Telerik.Reporting.Pdf.Fonts.TrueType.FontReader.GetFontData(Font font, Boolean& isTTC)
at Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(Font gdiFont)
Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Telerik.Reporting.Processing.Common.FontContainer.GetFontDef(String fontName, FontStyle fontStyle)
at Telerik.Reporting.Processing.Common.FontContainer.FillBuffer(Font gdiFont, Byte[]& buffer)
at Telerik.Reporting.Pdf.Fonts.TrueType.FontReader.GetFontData(Font font, Boolean& isTTC)
at Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(Font gdiFont)
An error has occurred while rendering the report: System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Telerik.Reporting.Processing.Common.FontContainer.GetFontDef(String fontName, FontStyle fontStyle)
at Telerik.Reporting.Processing.Common.FontContainer.FillBuffer(Font gdiFont, Byte[]& buffer)
at Telerik.Reporting.Pdf.Fonts.TrueType.FontReader.GetFontData(Font font, Boolean& isTTC)
at Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(Font gdiFont)
at Telerik.Reporting.Pdf.PdfFontTable.GetDescriptor(PdfFont font)
at Telerik.Reporting.Pdf.PdfFontDictionary..ctor(PdfDocument document, PdfFont drawingFont)
at Telerik.Reporting.Pdf.PdfFontType0Dictionary..ctor(PdfDocument document, PdfFont font)
at Telerik.Reporting.Pdf.PdfFontTable.GetFont(PdfFont font)
at Telerik.Reporting.Pdf.PdfPageDictionary.GetFontName(PdfFont font, PdfFontDictionary& fontDictionary)
at Telerik.Reporting.Pdf.Rendering.PdfRendererGraphicsState.Update(PdfFont font, Brush brush, Int32 renderMode)
at Telerik.Reporting.Pdf.Rendering.PdfRenderer.Update(PdfFont pdfFont, Brush brush, Int32 renderMode)
at Telerik.Reporting.Pdf.Rendering.PdfRenderer.DrawString(String text, PdfFont pdfFont, Brush brush, RectangleF rect, Boolean rightToLeft)
at Telerik.Reporting.ImageRendering.CanvasPdf.DrawRegularChunk(String text, Font font, Brush brush, RectangleF rect, TextFormat textFormat)
at Telerik.Reporting.ImageRendering.CanvasBase.DrawStringMultiline(String s, Font font, Brush brush, RectangleF rect, TextFormat format, Boolean isFinalTextChunk)
at Telerik.Reporting.ImageRendering.DocumentBase.WriteText(String text, RectangleF bounds, IFont font, Color foreground, TextFormat format, Matrix transform, Boolean isFinalTextChunk)
at Telerik.Reporting.Writing.TextBoxWriter.WriteContent(DocumentWriter writer, TextBox textBox, ElementPageInfo pageInfo)
at Telerik.Reporting.Writing.ProcessingContentElementWriter`1.WriteContent(T element, ElementPageInfo pageInfo, DocumentWriter writer)
at Telerik.Reporting.Writing.ProcessingElementWriter`1.Write(T element, ElementPageInfo pageInfo, DocumentWriter writer)
at Telerik.Reporting.Writing.ElementWriter`1.Telerik.Reporting.Writing.IElementWriter.StartWrite(LayoutElement element, ElementPageInfo pageInfo, DocumentWriter writer)
at Telerik.Reporting.Writing.WriteStartOperationsDispatcher.Write(IElementWriter writer, LayoutElement element, ElementPageInfo pageInfo, DocumentWriter documentWriter)
at Telerik.Reporting.Writing.WriteOperationsDispatcher.Visit(TextBox textBox)
at Telerik.Reporting.Processing.TextBox.Accept(ProcessingElementVisitor visitor)
at Telerik.Reporting.Processing.ProcessingElementVisitor.Visit(LayoutElement element)
at Telerik.Reporting.Writing.DocumentWriter.Telerik.Reporting.BaseRendering.IWriter.WriteStartElement(LayoutElement element, ElementPageInfo pageInfo)
at Telerik.Reporting.BaseRendering.PageHandler.Telerik.Reporting.Paging.IPageHandler.StartElement(LayoutElement element, ElementPageInfo info)
at Telerik.Reporting.Paging.PageStartElement.AddToPage(IPageHandler handler)
at Telerik.Reporting.Paging.PageElementLayer.AddToPage(IPageHandler handler)
at Telerik.Reporting.Paging.PageElementManager.AddToPage(IPageHandler handler)
at Telerik.Reporting.Paging.PageCompositionBase.AddElementsToPage()
at Telerik.Reporting.Paging.PageCompositionBase.SendPhysicalPages()
at Telerik.Reporting.Paging.PageCompositionBase.OutputPage()
at Telerik.Reporting.Paging.PageCompositionBase.CreatePages()
at Telerik.Reporting.Paging.PagerBase.Telerik.Reporting.Paging.IPager.CreatePages(IPageHandler handler, LayoutElement root)
at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(LayoutElement root, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback, PageSettings pageSettings)
Exception thrown: 'System.NullReferenceException' in Telerik.Reporting.dll
------------------------------------------------------------------------------------------------------------
Cheers
Nils