Telerik Forums
Reporting Forum
1 answer
73 views

When trying to render our telerik reports into PDF we sometimes get an error System.ObjectDisposedException: Cannot access a disposed object.

The version of Telerik.Reporting library we are currently using is 18.3.24.1112.

We checked the data being applied to the report and none of our objects are being disposed before being applied. 

I noticed that there was a memory leak fix to pdf rendering that occurred in version 18.3.24.1218.

Could this be the cause of the error or could it be something else?

1 answer
106 views

Hello. Can somebody please help me with custom user functions.

I am using Kendo reporting version 2025 Q1 (19.0.25.211) in my Net Core 8 project. I am using dynamically created reports (not from any template or similar).

Here is the code behind all with config and everything.

Config in app.config xml file:

In my Startup.cs in ConfigureServices I am calling this extension method:
services.AddTelerikReporting();

Here is the extension method:

Here is my custom report resolver:

Here is my custom user function:

I am using it when creating report xml like this:

private static void SetCategoryDateFormat(QueryResult resultDataModel, int dateIndex, GraphGroup categoryGroup, string dateFormat)
{
    var value = "NSP.NSPDateFormat(" + StringFormatHelper.RemoveDotsAndCommaAndSpace(resultDataModel.Columns[dateIndex].PropertyPath) + ", '" + dateFormat + "')";
    categoryGroup.Groupings.Add(new Grouping("=" + value));
}

I can confirm that in xml I receive from my rest api, in my custom report source resolver I get that in my xml string representing report definition which I than deserialize. 

The report is ok, but the call to this custom user function gives me this error:

The expression contains object 'NSP' that is not defined in the current context.

The resolver and custom user function are all in the same assembly NSP.Web.

Also here is the code in razor page for hmlt5 report viewer:

Can anybody give me an idea on why this error, what is happening? 

I have wasted a lot of time trying this to work?

Please don't hesitate to ask further questions.

Thanks in advance.

 

 

 

 

1 answer
123 views

Our .NET 8 project references .NET Standard Telerik.Reporting.dll.

After upgrading to Telerik Reporting 19.0 we get compiler warnings because of conflicting references.

Apparently, Telerik.Reporting.dll references .NET 9 DLLs (for example "System.Text.Json 9.0.0") while our .NET 8 project obviously references .NET 8 DLLs ("System.Text.Json 8.0.0").

I'm surprised this is happening because I thought Telerik.Reporting as a .NET Standard DLL should be independent of these .NET versions?

Do we have to go back to Telerik Reporting 18 to avoid these conflicts?

We are on .NET 8 because it has LTS (long term support) by Microsoft.

 

Dimitar
Telerik team
 answered on 03 Apr 2025
1 answer
96 views

Hi Telerik,
I am designing a report in Telerik Report Designer, and I have used a crosstab as shown below:


and the value of ABC (category) and XYZ is retrieved from the API. Suppose ABC are country/color/subject and XYZ are Nepal, Netherlands/red, green/maths, and English as shown below:



but expands according to the data we selected in the filter, and this table shows the category of the selected values accordingly.

My requirement:
I need 4 categories in one row only, and the remaining should be in another row. How can we do that?

Is there any way we can fix the width of the crosstab? so that the width of the crosstab will be fixed on the basis of the report width.



Regards,
Prabesh Shrestha

Todor
Telerik team
 answered on 03 Apr 2025
1 answer
119 views

Hi all,

I'm developing a report and I don't know how to layout it.

The data source is a JSON DataSource and his structure is the following :



public class School
{
	public string Name { get; set; }
	public List<Class> Classes { get; set; }
}

public class Class
{
	public string Name { get; set; }
	public List<Student> Students { get; set; }
	public List<Teacher> Teachers { get; set; }
}

public class Student
{
	public string FirstName { get; set; }
	public string LastName { get; set; }
}

public class Teacher
{
	public string FirstName { get; set; }
	public string LastName { get; set; }
	public string Role { get; set; }
}

The desired layout is illustrated on the join file DesiredLayout.png and the report definition is joined too (containing datasource).

As you can see in the report definition, I don't use Header section. Because my list of teachers, on the top right, cannot be in a Header section.

And my problem is when the list of students for one class take more than one page, the school name, the class name and the list of teachers don't repeat.

My second problem is for the numbering on the footer. I don't know how to make it correctly.

Thank you for your help, regards
Dimitar
Telerik team
 answered on 01 Apr 2025
1 answer
330 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
87 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
265 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
91 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
Bronze
Iron
Iron
 answered on 27 Mar 2025
1 answer
95 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
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?