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.
When my application runs in full trust permissions set, the following error is thrown if I have used the Telerik.Reporting.OpenXmlRendering NuGet package and try exporting to any of the OpenXML formats :
ERROR: Attempt by security transparent method 'Telerik.Reporting.OpenXmlRendering.Spreadsheet.Workbook..ctor()' to access security critical method 'DocumentFormat.OpenXml.Packaging.SpreadsheetDocument.Create(System.IO.Stream, DocumentFormat.OpenXml.SpreadsheetDocumentType)' failed.
If the file `WebReportDesignerSettings.json` doesn't exist before running the Web Designer REST Service, the latter will create it. However, the file will remain locked and the service will throw the exception:
"The process cannot access the file '/app/Telerik_Reporting/WebReportDesignerSettings.json' because it is being used by another process."
When the file exists, the problem will be avoided, which leads to the workaround - create the file at a starting point of the application. Here is a sample code:
static void InitFile()
{
var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Telerik Reporting", "WebReportDesignerSettings.json");
File.Create(path).Close();
}
To allow localization for the WebReportViewer in Version 17.1.23.718 and before, it was enough to provide a customized Version of "telerikReportViewer.stringResources.js", which extended the property "window.telerikReportViewer.sr".
This worked for both, the WebReportViewer and the Preview of the WebReportDesigner. With version R3 2023 SP1 (17.2.23.1114), this approach does not work anymore.
The following exception is thrown when setting up the .NET 6, .NET 7, and .NET 8 demos with version 17.2.23.1114 to utilize Reporting REST Service Redis Storage. The storage is configured to use the StackExchange.Redis version 2.0.601 with Telerik.Reporting.Cache.StackExchangeRedis.2:
Error registering the viewer with the service. An error has occurred. Method not found: 'Boolean StackExchange.Redis.IDatabase.StringSet(StackExchange.Redis.RedisKey, StackExchange.Redis.RedisValue, System.Nullable`1<System.TimeSpan>, Boolean, StackExchange.Redis.When, StackExchange.Redis.CommandFlags)'.
In the previous Reporting versions, 17.1.23.718 and 17.0.23.118 the Redis storage with the same setup works as expected.
When using the Report Viewer under WinForms, Print Preview allows the user to scroll through all report documents. I.E., everything in the document map. However, when using the Wpf version you cannot. In the Wpf version, the user must use the Document map to select and scroll through each particular area. For large reports containing multiple documents, this is tedious. Please make the Print Preview functionality for the WPF control match that supported by the WinForms control.
When selecting an item in the report designer (for instance a textbox) if i go in the properties and i set the anchoring property, i have to click in an other property to get my anchor property to be updated.
I have attached a video that reproduce the problem :
Select a textbox, go to anchoring in the property explorer
Set the anchoring
And click in the report itself
As you can see anchoring property hasn't been updated.
While some viewer options such as the pageMode, viewMode, etc. are already exposed and configurable through code, the parameters are not. This means that the viewer will always load the report with the default report parameter values which can troublesome.
For example, I need to be able to pass a JWT to a WebServiceDataSource inside my report and I use a report parameter for doing so. This works as expected when I use a simple report viewer but when the report is loaded by the Web Report Designer, it is not possible to pass a value from the front end where the designer is initialized.
The Web Report Designer's current layout is not flexible and cannot be customized. It will be useful to allow changes in the designer template, styles, etc.
For example, in some scenarios, the users should not be allowed to add DataSources to the report. In this case, the DataSources components should be hidden or disabled, which currently can be achieved with custom jQuery code.
In other scenarios, it may be necessary to change the styles of the designer elements.
It will be useful for the designer to expose also events.
As a user, I would like to be able to define guidelines for my report using the rulers surrounding the design window. The guidelines will make it a lot easier to line things up on the report.
The report has a single-value nullable parameter with AvailableValues.
When you preview the report in the Standalone Designer, if you checked Null, the value would be respected.
When you preview the report in Html5 Viewer and the parameter value selection is cleared, instead of rendering the report with a Null value, the report is rendered with the last selected value.
Steps to produce in the Html5 Viewer:
Here is a link to a muted video on how the issue may be reproduced.
If the parameter is not Nullable, the Preview button after step 4 stays enabled, and clicking on it produces the same result as with the Nullable parameter.
I am preparing report having Arabic and English text.
In the Standalone Report Designer for the .NET Framework, Report Preview and exported documents, including PDF are fine with R3 2023 and older versions from 2023.
When I render the same report in PDF in .NET 7 WebApi or with the .NET 6 Standalone Report Designer with R3 2023, the Arabic text is broken. The same look as expected with R2 2023 SP1 and previous Reporting versions.
When I open a tab that includes the Angular report viewer and close it immediately after, before the viewer can be properly initialized, the following error will be thrown:
core.js:7744 ERROR Error: Uncaught (in promise): TypeError: perspectiveManager.dispose is not a function
TypeError: perspectiveManager.dispose is not a function
at Object.dispose (telerikReportViewer.js:8447:30)
at TelerikReportViewerComponent.ngOnDestroy (telerik-report-viewer.component.js:61:27)
at executeOnDestroys (core.js:6118:1)
at cleanUpView (core.js:6021:1)
at destroyViewTree (core.js:5847:1)
at destroyLView (core.js:5999:1)
at RootViewRef.destroy (core.js:22750:1)
at ComponentRef$1.destroy (core.js:25284:1)
at RouterOutlet.deactivate (router.js:5577:1)
at ActivateRoutes.deactivateRouteAndOutlet (router.js:2101:1)
at resolvePromise (zone.js:1211:1)
at resolvePromise (zone.js:1165:1)
at zone.js:1278:1
at _ZoneDelegate.invokeTask (zone.js:406:1)
at Object.onInvokeTask (core.js:28767:1)
at _ZoneDelegate.invokeTask (zone.js:405:1)
at Zone.runTask (zone.js:178:1)
at drainMicroTaskQueue (zone.js:585:1)
at ZoneTask.invokeTask [as invoke] (zone.js:491:1)
at invokeTask (zone.js:1661:1)
We have the requirement to use a GS1-128 Barcode and have to encode dynamically long identifiers in it.
We found ways to add a FNC1 sign using C# or VB.NET but we are looking for a solution that uses only the Standalone Report Designer.
Hi,
We have today updated our docker reporting container to improve security, and at the same time upgraded to ,NET 8 from .NET 7 (Which worked fine). The error we're getting from Kubernetes is as shown below.....
at Telerik.Reporting.Processing.ReportProcessor.RenderReportSafe(Func`2 renderCallback, String format, IRenderingContext renderingContext)
at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, ReportSource reportSource, Hashtable deviceInfo, CancellationToken cancellationToken)
at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, ReportSource reportSource, Hashtable deviceInfo)
at ReportService.UI.Controllers.API.ReportExportController.GenerateReportPDFBase64(ReportRequestDTO reportRequest) in /src/ReportService.UI/Controllers/API/ReportExportController.cs:line 35
at lambda_method492(Closure, Object, Object[])
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Builder.Extensions.UsePathBaseMiddleware.InvokeCore(HttpContext context, PathString matchedPath, PathString remainingPath)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.HandleException(HttpContext context, ExceptionDispatchInfo edi)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
[18:05:37 INF] HTTP GET /ready responded 200 in 0.1777 ms
[18:05:47 INF] HTTP GET /ready responded 200 in 0.1380 ms
[18:05:57 INF] HTTP GET /ready responded 200 in 0.1588 ms
Logs from 12/29/2023, 5:54:22 PM
Our dockerfile is as shown below....
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
ENV ASPNETCORE_HTTP_PORTS=80
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
# For more info, please refer to https://aka.ms/vscode-docker-dotnet-configure-containers
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["AppointmentService.Api/NuGet.config", "./"]
COPY ["AppointmentService.Api/AppointmentService.Api.csproj", "AppointmentService.Api/"]
COPY ["AppointmentService.Domain/AppointmentService.Domain.csproj", "AppointmentService.Domain/"]
COPY ["AppointmentService.Infrastructure/AppointmentService.Infrastructure.csproj", "AppointmentService.Infrastructure/"]
COPY ["AppointmentService.Data/AppointmentService.Data.csproj", "AppointmentService.Data/"]
# Set the PAT for the IQHT NuGet feed
ARG IQHTNugetPAT=localhost
RUN sed -i "s|</configuration>|<packageSourceCredentials><iQHealthTech><add key=\"Username\" value=\"IQHTNuget\" /><add key=\"ClearTextPassword\" value=\"${IQHTNugetPAT}\" /></iQHealthTech></packageSourceCredentials></configuration>|g" ./NuGet.config
RUN dotnet restore "AppointmentService.Api/AppointmentService.Api.csproj"
COPY . .
WORKDIR "/src/AppointmentService.Api"
RUN dotnet build "AppointmentService.Api.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "AppointmentService.Api.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "AppointmentService.Api.dll"]
Our Kubernetes deployment manifest is as below...
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
service: appointmentservice
name: appointmentservice
spec:
replicas: 1
selector:
matchLabels:
service: appointmentservice
strategy: {}
template:
metadata:
labels:
service: appointmentservice
annotations:
dapr.io/enabled: "true"
dapr.io/app-id: "iqht-dev-appointmentservice"
dapr.io/app-port: "80"
spec:
containers:
- image: acriqemodevuks01.azurecr.io/appointmentservice:v$(Build.BuildNumber)
securityContext:
runAsUser: 5678
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
imagePullPolicy: IfNotPresent
name: appointmentservice
startupProbe:
httpGet:
path: /health/startup
port: 80
failureThreshold: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 80
successThreshold: 3
ports:
- containerPort: 80
env:
- name: "ASPNETCORE_ENVIRONMENT"
value: "iqemov2-development"
volumeMounts:
- name: secrets
mountPath: /app/secrets
readOnly: true
resources:
limits:
cpu: 75m
memory: 100Mi
requests:
cpu: 50m
memory: 50Mi
restartPolicy: Always
volumes:
- name: secrets
secret:
secretName: secret-appsettings
status: {}
...
apiVersion: v1
kind: Service
metadata:
labels:
service: appointmentservice
name: appointmentservice
namespace: iqemov2-development
spec:
type: ClusterIP
ports:
- port: 80
protocol: TCP
selector:
service: appointmentservice
status:
loadBalancer: {}
I wonder whether you are able to provide us with some guidance on how we can resolve this issue so that we can deploy it to the customer.
Thanks in advance for any help you can provide to help us resolve this issue.
Regards,
Damian