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.