Completed
Last Updated: 23 Jan 2024 06:57 by ADMIN
Release 2024 Q1
Gabor
Created on: 22 Nov 2023 08:24
Type: Feature Request
15
OpenXML renderings should work with DocumentFormat.OpenXml 3.0.0 and newer

The OpenXML renderings in .NET work with DocumentFormat.OpenXml 2.7.2 - 2.20.0

When upgrading to version 3.0.0 the Word rendering throws the following exception:

CSharp.Net7.Html5IntegrationDemo Error: 0 : System.TypeInitializationException: The type initializer for 'Telerik.Reporting.OpenXmlRendering.Wordprocessing.DocumentHelper' threw an exception.
 ---> System.TypeLoadException: Could not load type 'DocumentFormat.OpenXml.Packaging.ImagePartType' from assembly 'Telerik.Reporting.OpenXmlRendering.2.7.2, Version=17.2.23.1114, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' due to value type mismatch.
   at Telerik.Reporting.OpenXmlRendering.Wordprocessing.DocumentHelper..cctor()
   --- End of inner exception stack trace ---
   at Telerik.Reporting.OpenXmlRendering.Wordprocessing.DocumentHelper.CreateMainPart(WordprocessingDocument package)
   at Telerik.Reporting.OpenXmlRendering.Wordprocessing.DocumentBuilder.CreateMainPart()
   at Telerik.Reporting.OpenXmlRendering.Wordprocessing.DocumentBuilder.CreateBodyLayout()
   at Telerik.Reporting.OpenXmlRendering.Wordprocessing.ReportWriter.WriteDocument(DocumentBuilder documentBuilder, LayoutElement layoutElement)
   at Telerik.Reporting.OpenXmlRendering.Wordprocessing.WordprocessingWriter.WriteEndElement(LayoutElement source, ElementPageInfo pageInfo)
   at Telerik.Reporting.BaseRendering.PageHandler.Telerik.Reporting.Paging.IPageHandler.EndElement(LayoutElement element, ElementPageInfo info)
   at Telerik.Reporting.Paging.PageEndElement.OutputToPage(IPageHandler handler)
   at Telerik.Reporting.Paging.PageElementsLayer.OutputToPage(IPageHandler handler)
   at Telerik.Reporting.Paging.PageContent.Output(IPageHandler handler)
   at Telerik.Reporting.Paging.PageCompositionBase.OutputPageContent(Stopwatch stopwatchOutputContent, PageContent pageContent)
   at Telerik.Reporting.Paging.PageCompositionBase.<>c__DisplayClass124_0.<CreatePageContentOutputTask>b__0()
An error has occurred while rendering the report: System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.SpinThenBlockingWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.InternalWaitCore(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken)
   at Telerik.Reporting.Paging.PageCompositionBase.SeparateThreadOutputBehavior.Finish()
   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)
*** Render Report #0 "ReportCatalog" DONE in 00:00:00.2183346 ***

CSharp.Net7.Html5IntegrationDemo Error: 0 : An error occurred while rendering the report in separate thread: System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.SpinThenBlockingWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.InternalWaitCore(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken)
   at Telerik.Reporting.Paging.PageCompositionBase.SeparateThreadOutputBehavior.Finish()
   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)
   at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback)
   at Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 processingReports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
   at Telerik.Reporting.Processing.ReportProcessor.RenderCore(String format, IList`1 reports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
   at Telerik.Reporting.Services.Engine.ReportRenderer.Render(ReportRendererArgs args)
   at Telerik.Reporting.Services.Engine.Rendering.RenderWithCulture(ReportRendererArgs args)
   at Telerik.Reporting.Services.Engine.Rendering.ThreadFunc(Object o)

 

I would prefer my OpenXML rendering to work with the latest DocumentFormat.OpenXml version.

3 comments
ADMIN
Ivan Hristov
Posted on: 17 Jan 2024 13:41

Hello all,

Today we've published a prerelease build for our 2024 Q1 major release, which should be accessible from your Telerik user accounts. The release has version 2024 Q1 PI1 18.0.24.116, where PI stands for 'product iteration'.

Among the other goodies that you can read here (https://www.telerik.com/support/whats-new/reporting/release-history/progress-telerik-reporting-2024-q1-pi1-18-0-24-116), it also brings support for OpenXML 3.0 SDK for .NET Framework and .NET Standard projects. The new .dll is named Telerik.Reporting.Telerik.Reporting.OpenXmlRendering.3.0.0.dll and can be found in the product installation folder, or through the NuGet Telerik feed.

Microsoft introduced a few breaking changes in the new version, but we believe we handled all of them, without breaking the backwards compatibility with the earlier versions of OpenXML SDK. Still, we'll appreciate it if you give it a try and share if it works in your scenarios.

Regards,

Ivan Hristov

Telerik Reporting

Valerio
Posted on: 03 Jan 2024 08:21
Plus here, should work with
Kalli Kaldi
Posted on: 27 Nov 2023 13:02

Plus one here

Excel does not work with DocumentFormat.OpenXml