Unplanned
Last Updated: 31 Oct 2024 13:11 by ADMIN
Ian
Created on: 24 Oct 2024 14:36
Type: Feature Request
1
Customize Telerik via code

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,

1 comment
ADMIN
Todor
Posted on: 31 Oct 2024 13:11

Hello Ian,

Thank you for this input.

The suggested feature would indeed be beneficial for our users and we are already considering the introduction of runtime code compilation in the processing workflow of our reports. We would take into account your ideas as well. The ServiceProvider seems very promising.

We still need to investigate and discuss the potential security issue related to the feature. We will update the thread after a discussion within the team. 

Regards,
Todor
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.