Unplanned
Last Updated: 17 Jan 2023 11:33 by ADMIN
Sparky
Created on: 10 Jan 2023 20:30
Type: Feature Request
1
"Item" function to accept string keys in order to support Dictionary<string,object>
It would be a nice feature to add "Item" function variant that supports dictionaries with string key instead of just arrays with index.

For example:

Item("MyProperty",Fields.MyDictionary)

This would add a invaluable degree of freedom when considering the structure and usage of report's datasources. For example, the current way of working with ExpandoObject (which are also IDictionaries) is very problematic and in my opinion not a good way of doing it. One such utility function will eliminate almost all of the problems that are present at the moment.

Another way (even better) would be to make something like:
Fields("MyProperty")
available in the expressions.

If both ways are added, this will completely (in my opinion) eliminate all the problems using dictionaries and expando objects in reporting.
1 comment
ADMIN
Dimitar
Posted on: 17 Jan 2023 11:33

Hello Spartak,

Thank you for the feedback!

There is already a Fields function that accepts a string argument and returns the value of the requested field, however, it works only on the top level. In other words, a subfield's value cannot be extracted from a complex field object like a dictionary and it does make sense that there would be cases where that functionality would be necessary.

With this in mind, we have decided to approve the feature request.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.