I'm in the process of evaluating the Telerik reporting tool and am hitting a bit of a wall with something that I thought woudl be reasonably easy. We currently use a generic class that holds an object array containing the data that is to be presented in a grid in the UI. We then use an indexer on the class to access the appropriate value by positional index. Since our end users have extensive flexibility in which columns can be included in their grids/reports and in what order, this is the simplest way for us to have a bindable object that does not have explicit property names.
We'd like to reuse this same object for a report, but I cannot for the life of me figure out how to set up an expression for a group/field that can access the indexer on the underlying business object. If I use the normal c# indexer notation of, for example, "=[2]" then I get the error "The expression contains object '2' that is not defined in the current context."
We'd like to reuse this same object for a report, but I cannot for the life of me figure out how to set up an expression for a group/field that can access the indexer on the underlying business object. If I use the normal c# indexer notation of, for example, "=[2]" then I get the error "The expression contains object '2' that is not defined in the current context."
I tried adding a property called "Values" that exposed the object array and setting the expression to "=Values[2]" but that didn't help either. Got the error "Missing operator before [2] operand." Also tried "=Values.2" and that didn't help either ("Cannot interpret tocken '2' at position 7.").
Everything works find if I create explicit properties on the business object to expose the values in the array, but as I noted previously, this isn't a feasible solution. So is this simply not possible with Telerik Reporting, or am I missing a subtle syntactical requirement? Am I stuck having to take my existing list of business objects and convert them into a data table to use as the report's Data Source?