Telerik Forums
Reporting Forum
1 answer
34 views

I am using VIsual Studio 2022 17.13.5 (latest as of March 27,2025)
At some point - not sure if due to a VS update or a Telerik Reporting update, the Report Designer no longer loads with in Visual Studio
(the stand alone designer still works ok)

But now, if I double click on one of my report definition classes, I get an error "Value can not be null, parameter name: instance"

 

Here is the Call Stack:

at System.ComponentModel.TypeDescriptor.AddAttributes(Object instance, Attribute[] attributes)
at Microsoft.VisualStudio.Design.VSDesignSurface.CreateDesigner(IComponent component, Boolean rootDesigner)
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)

 

Ivet
Telerik team
 answered on 31 Mar 2025
1 answer
22 views

I have a report viewer in my WPF app that's working like a charm except that when I click the "Search" icon I encounter an uncatchable "System.Windows.Markup.XamlParseException" exception - I can only catch it as an unhandled exception.  The main exception says "Provide value on 'System.Windows.StaticResourceExtension' threw an exception."  The inner exception says "Cannot find resource named 'GlyphSearchStop'. Resource names are case sensitive.".  I've searched through "C:\Program Files (x86)\Progress\Telerik UI for WPF 2025 Q1" and can find no reference to anything called "GlyphSearchStop".

Any help would be much appreciated!

Thanks!

Petar
Telerik team
 answered on 31 Mar 2025
4 answers
197 views

Hi,

Can I ask does the older version of Telerik Report (Reporting 2017) supports visual studio 2019 ?

If it does, is it possible to provide instruction on how to enable it please?

It seems to work for visual studio 2017, but menu will not show on visual studio 2019.

Many thanks

Regards

ERIKA
Top achievements
Rank 1
Iron
 answered on 28 Mar 2025
1 answer
21 views

Hi, in a report, I need to display, in one text box the first name in bold, a space and the last name (not in bold). first name and last name come from a data source.

I use a HTML Text Box and in the Expression Editor, I type :

=Fields.FirstName + " " + Fields.LastName

And I Put Fields.FirstName in bold. The result is :

[=<strong>Field.FirstName</strong> + " " + Fields.LastName]

But when I preview the report, I have the error :

An error has occured while processing Table 'listEleves':
htmlTextBox1.Value expression [=<strong>Fields.FirstName</strong> + " " + Fields.LastName] is not valid:
Syntax error: Missing operand before '<' operator.

What is wrong ?

Krasimir
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 27 Mar 2025
1 answer
25 views

So, I've spent about a week trying to resolve an issue where we had one sneaky user function annotated with [Function] that worked fine before the change, but when we updated to 19.0.25.211 everything stopped working normally which is documented but I would say this is really a change that users should be made more aware of.

https://www.telerik.com/support/whats-new/reporting/release-history/progress-telerik-reporting-2025-q1-19-0-25-211

We constantly evaluate the release history paying special attention to "breaking changes" but this is under the category of "improved" and no real indication that it could negatively affect someone's pre-existing reporting should they use [Function] in a way that is now .. changed. Especially when that change causes reporting errors, that are perceived as "broken".

We're already having a hard time justifying the very very fragile nature of using Telerik Reporting (re: vs designer, core vs netframework, the ticket was created in 2018 ...... !!!! Did you know your competitor's vs designer works properly in netcore/netframework??) but this was just so painful. Adding something more to the release notes would have prevented so much wasted time.

Ivan Hristov
Telerik team
 answered on 26 Mar 2025
1 answer
25 views

The MultiValue drop-down/list is not working correctly. We are using version 18.0.24.130.

If you select all values, it works correctly except the values are not highlighted to indicate they are selected. 

If you select individual values on a required parameter, the message "Please input a valid value" does not go away and the Preview button remains disabled. If you select individual values on a non-required parameter, they are properly highlighted, but when you click Preview, the report ignores them / does not use them to filter the results.

This happens for every report, regardless of who develops it, wherever the multi-value parameter is used. 

Our sites using  15.2.21.915 does not have this issue. 

Thanks!

Todor
Telerik team
 answered on 26 Mar 2025
1 answer
23 views

I have a program that is installed in C:\Program Files (x86)\Qiagen\PGxUtils and I am using the code below to render reports by passing the full path of the report template to the function. This works fine when it is a single standalone report but when I try to use a report with subreports I get the following:

Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_PatientDemographics.trdp'., 
Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_Header.trdp'., 
Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_PrescribingInsights.trdp'., 
Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_RiskManagement.trdp'., 
Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_Medication.trdp'., 
Could not find file 'C:\Program Files (x86)\Qiagen\PGxUtils\SubFinalReportV1_TestResult.trdp'.

 

Reading the online documentation this seems to be by design but I need to know how to work around it in order to use subreports.

using Telerik.Reporting;
using System.Text.Json.Nodes;
using System.Text.Json;

namespace PdfReportBuilder
{
    public static class TelerikReportBuilder
    {
        public static ReportSource GetReportSource(string reportPath, JsonNode jsonNode)
        {
            var reportPackager = new ReportPackager();
            using (var sourceStream = System.IO.File.OpenRead(reportPath))
            {
                Report report = (Report)reportPackager.UnpackageDocument(sourceStream);
                var jsonDataSources = report.GetDataSources().OfType<JsonDataSource>();
                foreach (var jsonDataSource in jsonDataSources)
                {
                    jsonDataSource.Source = jsonNode.ToJsonString(new System.Text.Json.JsonSerializerOptions { WriteIndented = true });
                    // This proves that Source can be assigned a json string, assigning a JsonNode doesn't work.
                    // JsonNode? tmp = JsonNode.Parse((jsonDataSource.Source as string)!);
                    // jsonDataSource.Source = tmp.ToJsonString(new System.Text.Json.JsonSerializerOptions { WriteIndented = true });
                }
                return new InstanceReportSource
                {
                    ReportDocument = report
                };
            }
        }

        public static byte[] BuildReport(string reportPath, JsonNode jsonNode)
        {
            var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();

            // set any deviceInfo settings if necessary
            var deviceInfo = new System.Collections.Hashtable();

            ReportSource reportSource = GetReportSource(reportPath, jsonNode);

            Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);

            if (!result.HasErrors)
            {
                return result.DocumentBytes;
            }
            else
            {
                throw new Exception(string.Join(", ", result.Errors.Select(ex => ex.Message)));
            }
        }

        public static byte[] BuildReport(string templatePath, JsonElement root)
        {
            JsonNode? jsonNode = JsonNode.Parse(root.GetRawText());
            if (jsonNode == null)
            {
                throw new ArgumentNullException(nameof(jsonNode), "Parsed JsonNode cannot be null.");
            }
            return BuildReport(templatePath, jsonNode);
        }
    }
}
Petar
Telerik team
 answered on 21 Mar 2025
0 answers
24 views
1 answer
21 views

On Windows I am able to set the background image of a textbox with the following code:


using (var surface = SkiaSharp.SKSurface.Create(new SkiaSharp.SKImageInfo(100, 100)))
{
    Telerik.Reporting.Processing.TextBox textbox;

    using (var image = surface.Snapshot())
    using (var data = image.Encode())
    {
        byte[] imageData = data.ToArray();
 
        using (var ms = new MemoryStream(imageData))
        {
            textbox.Style.BackgroundImage.ImageData = System.Drawing.Image.FromStream(ms);
        }
    }
}

Image.FromStream has the following error:

"CA1416: This call site is reachable on all platforms. 'Image.FromStream(Stream)' is only supported on: 'windows' 6.1 and later."

What is the Linux compatible version of Image.FromStream()?

Petar
Telerik team
 answered on 21 Mar 2025
0 answers
33 views

We are currently generating TRDX reports using the Telerik Report Designer tool, saving the XML output to a database. When a user runs a report, we retrieve the report XML, update the parameters, and then render the report using the Report Processor. However, we now need to export the report into multiple Excel tabs.

One potential solution is to use Report Book, which is stored in a TRBP file, but we're having trouble reading the contents of this file. Are there any alternative approaches we could take to achieve this functionality?

 
Rajesh
Top achievements
Rank 1
 asked on 20 Mar 2025
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?