I export the same TRDP report that embeds a Bitmap image on Windows with GDI and on Linux Docker Container.
The result PDF file from the Linux environment is much bigger than the one generated on Windows.
I have projects on .NET Core and I want to use the System.Text.Json serializer that is the new default, but reporting relies on Newtonsoft.Json.
---
ADMIN EDIT
There are two approaches that can be taken right now to solve this:
OPTION 1: define separate endpoints (services, projects) for the different tasks - they can still use the same database layer through a shared project, depending on the architecture you have. This would let you have separated services with the appropriate serializers without custom attributes and code (see below). For example, create a separate project for the reporting REST services.
OPTION 2: add some custom decoration on the endpoints so you can choose which serializer is used on each, you can find some examples here: https://stackoverflow.com/questions/59650907/how-to-configure-two-json-serializers-and-select-the-correct-one-based-on-the-ro - the point being to register a serializer depending on the endpoint based on your own code rather than let the framework put one in for all endpoints.
NOTE: This would be a breaking change.
---
Even though I set "parametersAreaVisible" to false, the parameter area is still visible. A bit of tweaking.
Let me make a change request in the telerikReportViewer-18.3.24.1112.js file:
function showParametersAreaIfNecessary(params) {
parametersAreaNecessary = hasVisibleParameters(params) || !controller.isReportAutoRun();
showParametersArea(parametersAreaVisible && parametersAreaNecessary);
}
Reproducible in version: 18.2.24.924 +
Not reproducible in version: 18.2.24.806
Description
In releases before 18.2.24.924 it was enough to open dll with types from SRD in order to be able to import the type reports. Currently, this is possible only if you copy the dll next to SRD exe file and add entry in Assembly References for the dll.
Steps To Reproduce
Build the project CSharp.ReportLibrary.csproj in C:\Program Files (x86)\Progress\Telerik Reporting 2024 Q4\Examples\CSharp.NET Framework\ReportLibrary
Start SRD FF and from Open menu select the CSharp.ReportLibrary.dll dll in C:\Program Files (x86)\Progress\Telerik Reporting 2024 Q4\Examples\CSharp.NET Framework\ReportLibrary\bin\Debug
Expected behavior
Something like "Please add first Assembly reference to the dll... from ...". Or even better. Do you allow the assembly ... to be loaded? And we can add the assembly reference instead of the customer.
Actual behavior
TypeReference error.
If you have the latest Telerik.Reporting NuGet package (18.3.24.1112) installed simultaneously with the Telerik.Documents.Fixed NuGet package, indeed, the compile time error occurs:
The type 'Size' exists in both 'Telerik.Documents.Core, Version=2024.4.1106.20, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' and 'Telerik.Reporting, Version=18.3.24.1112, Culture=neutral, PublicKeyToken=a9d7983dfcc261be'
This undesired behavior is not reproducible with the previous version of Telerik Reporting. This is caused due to the fact that Telerik.Documents.Primitives.Size is contained in both assemblies/packages.
Workaround: Resolving Compile Time Error with Telerik.Documents.Fixed and Telerik.Reporting after Upgrading to Q4 2024
It would be very convenient if we could just right-click on a calculated field, such as "Period" in the screenshot below, and be able to modify the existing expression (within a context window)
Instead, I now have to do the following:
1. Click on the Data Source
2. Click on the ellipses button within the "Calculated Fields" property of the Data Source's properties
3. Find the desired expression within the "Edit Calculated Fields" window
4. Click on the expression's drop-down and select <Expression>
That's a lot of clicks for something that is done rather frequently!
I have been forcing my webservice data source into a workable solution for making GraphQL requests. Right now in order for us to use GraphQL, we have to build out the request manually with a string such as the following:
{"query: "query GetSomeResult($input: Int!) {result {id name}}", "variables": "{"input": @parameter}" }
While this is a normal way to hand craft a GraphQL request, the issue I have is that it shouldn't need to be that hard. Also I get no intellisense or suggestion in regards to the data returning. This means that when I try to bind data to a text box, I have to visually validate that the [=Fields....] is actually correct by looking at the GraphQL query and at the code base. I would love to see the ability to to just say have a set of standard api technologies we could implement from such as GraphQL queries, GRPc queries, or any other contract style request. I would expect that the data source logic would be smart enough to parse the query (at least for GQL) and be able to provide reccomendations.
Also a major issue we have had is in being able to pass that data source to subReports, or dealing with any nested objects such as a user.address.addressLine1 would not be able to be found if address is a nested values like the following
user: { address: { addressLine1 } }
I am displaying SVG images using a PictureBox, but all the SVGs appear in the same color rather than their original colors when viewing the report through the HTML5-based Report Viewers in the browser.
To verify, I checked the report directly in Telerik Report Designer, where the colors display correctly.
When exporting the report as a PDF from the same report viewer, the SVG images retain their original colors in the exported PDF.
My SVG images have embedded style classes. Some of the class names are the same although the styles may differ.
Currently(version 18.2.24.924), it is not possible to use bindings or conditional formatting on the styling of the radial gauge ranges.
I need to be able to change their styles, such as the color, based on my data.
The RTF rendering automatically switches to the Tables rendering mode whenever a Crosstab/Table/List is detected in a report. This rendering mode throws an exception whenever the report contains PictureBox with one of the following sizing options.
The RTF export should work with all PictureBox sizing options regardless of the rendering mode.
To work around the issue currently, one can either force the rendering engine to use the Frames rendering mode using the RenderingMode device information property or set the Sizing property of all picture boxes in the report to AutoSize.
We have successfully downloaded and installed Google Open Sans fonts (from the URL: https://fonts.google.com/specimen/Open%20Sans#:~:text=Open%20Sans%20is%20a%20humanist%20sans%20serif) to a Linux Ubuntu-based Docker container using the following Dockerfile script to install the dependencies and the fonts:
RUN apt-get update && apt-get install -y libfreetype6 libfontconfig1 fontconfig unzip #Google Fonts RUN mkdir -p /usr/share/fonts/truetype/googlefonts && cd /usr/share/fonts/truetype/googlefonts COPY ["Open_Sans.zip", "/usr/share/fonts/truetype/googlefonts"] RUN unzip -d /usr/share/fonts/truetype/googlefonts /usr/share/fonts/truetype/googlefonts/Open_Sans.zip RUN rm -f Open_Sans.zip RUN ls -al /usr/share/fonts/truetype/googlefonts RUN fc-cache -fv RUN fc-match OpenSans
Open_Sans.zip file should be in the solution folder when running the Docker from Visual Studio.
The fonts are displayed as expected when previewing in the browser. When exporting to PDF though, the Reporting engine throws the following exception when Open Sans font is used:
CSharp.Net8.Html5IntegrationDemo Error: 0 : System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeCollectionHeader.Read(FontReader fontReader)
at Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeCollectionHeaderVersion2.Read(FontReader fontReader)
at Telerik.Reporting.Pdf.Fonts.TrueType.FontCollectionProgram.Decompile()
at Telerik.Reporting.Pdf.Fonts.TrueType.FontCollectionProgram.EnsureFonts()
at Telerik.Reporting.Pdf.Fonts.TrueType.FontCollectionProgram.get_Fonts()
at Telerik.Reporting.Pdf.Fonts.TrueType.FontCollectionProgram.SelectFontProgram(String fontName, String fontFamily, Boolean bold, Boolean italic, Boolean underline, Boolean strikeout)
at Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(IFont engineFont)
at Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(PdfFont font)
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.PdfRenderer.GetFontName(PdfFont font, PdfFontDictionary& fontDictionary)
at Telerik.Reporting.Pdf.Rendering.PdfRendererGraphicsState.Update(PdfFont font, IBrush brush, Int32 renderMode)
at Telerik.Reporting.Pdf.Rendering.PdfRenderer.Update(PdfFont pdfFont, IBrush brush, Int32 renderMode)
at Telerik.Reporting.Pdf.Rendering.PdfRenderer.DrawString(String text, PdfFont pdfFont, IBrush brush, RectangleF rect, Boolean rightToLeft)
at Telerik.Reporting.Pdf.Drawing.PdfGraphics.DrawString(String s, IFont font, IBrush brush, RectangleF rect, StringFormatBase format)
at Telerik.Reporting.ImageRendering.CanvasPdf.DrawRegularChunk(String text, StringChunkContext context)
at Telerik.Reporting.ImageRendering.CanvasBase.DrawStringChunk(String s, StringChunkContext context)
at Telerik.Reporting.ImageRendering.CanvasBase.DrawStringMultiline(String s, StringChunkContext context, Boolean isFinalTextChunk)
at Telerik.Reporting.ImageRendering.DocumentBase.WriteText(String text, RectangleF bounds, IFont font, Color foreground, TextFormat format, MatrixBase transform, Boolean isFinalTextChunk)
at Telerik.Reporting.Writing.TextBoxWriter.WriteContent(DocumentWriter writer, TextBox textBox, ElementPageInfo pageInfo)
at Telerik.Reporting.Writing.ProcessingContentElementWriter`1.WriteElement(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.Write(IElementWriter writer, LayoutElement element)
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.WriteOperationsDispatcher.DispatchWriteOperation(LayoutElement element, ElementPageInfo pageInfo)
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.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()
CSharp.Net8.Html5IntegrationDemo Error: 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)
The same report with the same fonts is rendered successfully on Windows with the Standalone Report Designer for .NET 8 with both GDI and Skia graphics engines.
Currently, to customize the report engine, for example to add some custom user functions, we have to either use the app config or provide a IConfiguration to ReportProcessor constructor, which seems to set a static field for all reports, and on top of that we have to provide a whole assembly (which will load ALL non-private static methods, I did try to use typereferences instead of assemblyReferences, but that doesn't seem to work for custom functions).
Meanwhile all we needed was to expose a handful of functions. Our current workaround is to have a whole assembly dedicated to that.
It'd good to be able to:
- Specify either a single class or individual methods through the library API (e.g. reportProcessor.AddCustomFunction("name", (arg) => ...); or reportProcessor.AddCustomFunctions(typeof(MyCustomFunctions);)
- Avoid using static state (it limits how the library can be used and, more importantly, tested)
- Maybe have a way to provide a Service Provider, that Telerik library would use to create services/classes and pull IConfiguration from, especially those we provide, that way the custom functions could use services from our application, rather than using all static methods.
Thank you,
We faced the following issue when previewing a big enough report. Here are the steps to reproduce the bug:
1) after the report gets loaded, press the Preview button from the Parameters area.
2) as soon as the report starts loading, the class="trv-loading" is added to the Parameters area. While still report loading is in progress, press the "Stop Rendering" button.
3) When the message Report processing was canceled. is displayed, the Parameters area remains inactive. This happens because its class="trv-loading" is not removed as it is expected.
Currently, when you design a report with SqlDataSource, ObjectDataSource, etc. you need to have access to the corresponding database, assemblies, etc. to see the fields and use the drag-and-drop functionality of the report designers.
The requirement is to embed the corresponding schema in the report or designer to let the report creator access the data source fields even without these external resources.
As an example, in the WebServiceDataSource the report creator may use inline JSON rather than connecting to the Web Service. This saves time and resources required for establishing the connection that is in fact not necessary for design purposes.
When the report rendering is manually stopped through the Report Viewer, the Release Document request is made, however, it does not wait for the report rendering to be fully canceled, instead, it only sets a flag that it should stop.
The report engine checks for the flag periodically and eventually stops the report rendering, throwing an OperationCanceledException. I need to be able to catch this exception so that I can dispose of the document resources as soon as possible.
When there is rotated text (270 degrees) in the Crosstab header, the FreezeColumnHeaders and FreezeRowHeaders don't work as expected.
Resetting the angle to the default (0 degrees) fixes the problem.