The Initialize method in ReportViewer.cs is called from both the OnLoaded and OnApplyTemplate methods, which in turn calls the AttachModelEventHandlers method. This leads to it adding the event handlers to the model twice every time it is loaded. The DetachModelEventHandlers is only called once (in the OnUnloaded method), so if you keep unloading and reloading the control, it adds 2 event handler invocations but removes only one. This means each one is called at least twice (if you have only loaded the control once), then 3, 4, 5, etc times if you keep unloading and reloading it.
I've worked around this by adding code to my wrapper class to prune the duplicated handlers for now, but this needs fixing in the base code.
Currently, there is an MCP server that allows for integrating and developing report viewers, report designers, and Reporting REST APIs through Copilot. Consider allowing end users without Telerik Reporting experience to also build reports using AI.
Currently, when using External Stylesheets in the reports, the engine tries to first load the stylesheet as an embedded resource of the assembly. If it fails to load it from the assembly, a message is written to the trace along the lines of:
ESS: Attempt to load ExternalStyleSheet from EmbeddedResource from assembly Telerik.Reporting, Version=19.0.25.211 with resource name styles.xml is unsuccessful.
After this, the engine will try other ways to resolve the stylesheet such as from URI and if it succeeds, the report will render as expected.
This can create confusion because looking at the trace, one might think that there were errors with the rendering of the report because the stylesheet did not load but it was actually successfully loaded with one of the other approaches.
It would be better to write the errors to the trace only if the stylesheet does not load after all attempts.
I have a .NET project. I tried to add a CS-based report to it using the Visual Studio item template. However, when I opened it, I encountered an error message, which wasn't helpful.
After reaching out to the technical support, I was told that the Visual Studio Report Designer was not supported in .NET projects, and the alternative was either to open the CS-based report through the Standalone Report Designer or use TRDP reports (recommended for new reports) instead.
It would be nice if there were some warning about this, as it would save me some time and confusion, as at first, when I encountered the error message, I took the assumption that something was corrupted with my project.
Use SqlDataSource SelectCommand xml element instead xml attribute - it allows to write complex sql requests in any tool and just put it into xml without changes and have it well-formatted and readable:
So, instead of
save it as
or even
In the latest Reporting version, the interface of the report viewer allows users to set the value of a multiselect report parameter to an empty collection but not make it null.
In some scenarios, reports rely on parameters being null to filter their data and this makes them unusable in the latest version.
Images taken with a mobile device are sometimes displayed in PictureBox rotated by 90, 180 or 270 degrees. The reason is that whenever a photo is taken, the device saves its current accelerometer orientation into a corresponding Exif tag with the image metadata, so this info is then read and taken into account by our Report Designer.
Currently, the is permission for disabling saving, but it disables only the "Save" button.
I would like to be able to disable the "Save As" button and keep the "Save" button active, or vice-versa.
I am rendering reports locally using the report processor. When I use the RenderReport method after processing MS Office Documents and PDF files with the Spire. Office, it causes the text of the report rendered with Telerik Reporting to get truncated:
using Telerik.Reporting;
Spire.Doc.Document document = new Spire.Doc.Document();
var wordDocPath = "./wordtest.docx";
var pdfFilePath = System.IO.Path.Combine("../../../", "wordtest.pdf");
document.LoadFromFile(wordDocPath);
Spire.Doc.ToPdfParameterList toPdf = new Spire.Doc.ToPdfParameterList();
//toPdf.AutoFitTableLayout = true;
document.SaveToFile(pdfFilePath, toPdf);
document.Close();
var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
var reportPackager = new ReportPackager();
string sourceReportFile = "./Static Broken CSU Analysis.trdp"; ;
using (var sourceStream = System.IO.File.OpenRead(sourceReportFile))
{
var report = (Report)reportPackager.UnpackageDocument(sourceStream);
var deviceInfo = new System.Collections.Hashtable();
var reportSource = new InstanceReportSource();
reportSource.ReportDocument = report;
Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);
if (!result.HasErrors)
{
string fileName = result.DocumentName + "." + result.Extension;
string filePath = System.IO.Path.Combine("../../../", fileName);
using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
{
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
}
}
}If I comment out the section that is converting the totally unrelated word file to pdf and run it again, it does not clip.
This is related to Ticket ID 1699907.
Currently, the WinForm report viewer fetches configuration (specifically the connection string for any named connection strings defined in reports) directly from appsettings.json, however, it would be useful if the report viewer could take into account an injected IConfiguration since there are scenarios where the configuration may not exist in appsettings.json or a preferred or more up to date user selected value has been added to the configuration from a different source (such as a userSettings.json or secrets.json).
Some background of my use case:
I have a desktop WinForms application targeting .NET 8.0. It usesTelerik.Reporting 19.2.25.813 and Telerik.ReportViewer.WinForms 19.2.25.813 to display reports.When I drag a data field from a DataSource component to the Report details section in the Standalone Report Designer, the Report > DataSource property is set automatically to the corresponding DataSource component.
In the Web Report Designer, when I drag a data field, the Report > DataSource property remains empty, and the Preview shows an empty report. It would be very helpful the same functionality to be introduced also in the Web Designer.
When the report contains SVG images with Arc segments, the rendering with Skia may result in the following exception:
Telerik.ReportDesigner.Net Error: 0 : System.InvalidOperationException: Invalid image data. ---> Telerik.Drawing.Skia.Exceptions.SkiaNotSupportedException: Exception of type 'Telerik.Drawing.Skia.Exceptions.SkiaNotSupportedException' was thrown. at Telerik.Drawing.Skia.Drawing2D.GraphicsPath.AddArc(RectangleF rect, Single startAngle, Single sweepAngle) at Telerik.Reporting.Svg.SvgRectangle.Path(ISvgRenderer renderer) at Telerik.Reporting.Svg.SvgVisualElement.Render(ISvgRenderer renderer, Boolean renderFilter) at Telerik.Reporting.Svg.SvgVisualElement.Render(ISvgRenderer renderer) at Telerik.Reporting.Svg.SvgRectangle.Render(ISvgRenderer renderer) at Telerik.Reporting.Svg.SvgElement.RenderChildren(ISvgRenderer renderer) at Telerik.Reporting.Svg.SvgElement.Render(ISvgRenderer renderer) at Telerik.Reporting.Svg.SvgFragment.Render(ISvgRenderer renderer) at Telerik.Reporting.Svg.SvgDocument.Draw(ISvgRenderer renderer, ISvgBoundable boundable) at Telerik.Reporting.Svg.SvgDocument.Draw(Int32 rasterWidth, Int32 rasterHeight) at Telerik.Reporting.Processing.Imaging.SvgImageItem.CreateBitmapImage(RadSvgImage svg, Size targetSizePx) at Telerik.Reporting.Processing.Imaging.SvgImageItem.DrawImage(RadSvgImage svg, CreateImageContext context) at Telerik.Reporting.Processing.Imaging.SvgImageItem.CreateImageCore(CreateImageContext context) at Telerik.Reporting.Processing.Imaging.ImageItemBase.CreateImage(CreateImageContext context)