first I want to say thank you for this great release. It is really helpful to me.
second, I have a lot of data structures that are represented by Lists of interfaces instead of Lists of objects. I can syntactically use AddTable<T> with an interface type (it compiles) but on report.Run I get runtime errors which tell me that the properties I am using in my template file don't exist. (while they really do exist)
If I create a new List of objects and add my interface based objects with a cast to that new list ( newlist.add(TMyObject(myInterfaceBasedObject)) ), I can pass them to the report and run it without runtime errors.
Question: Would it be a simple thing for you to add support also for Lists or Arrays that contain interfaces?
If it's not a simple thing, forget it, otherwise it would be of great help because I could avoid copying my data to report specific data structures and directly use my interface based data structures (maybe this applies also to other users ?)
I've been investigating, and you can make a report from TList<Interface>, if the interface is compiled with {$M+}, like:
{$M+}
MyInterface = interface
...
end;
{$M-}
(you might not writ the $M-, and just wrap the whole unit in $M+)
Now, about the limitations:
Since there is not RTTI for properties in interfaces, you can only call methods of the interface. You can't of course call fields because the interface doesn't have them (even if the object implementing the interface has them).
If you can live with this limitation. It should work. I think a basic report should run in 6.6.1 as long as you use $M+, but I've improved the support in 6.6.2 to fully support interfaces everywhere. We should be publishing 6.6.2 this friday if no problems appear.
Would it be possible as a convenience functionality to try find a method in the interface with a prefixed 'Get' in the case where a used name doesn't exist in the dataset?
That would solve the issue if one uses the convention to name the getter methods with a prefixed 'Get'
6.6.2 (just released in our website) should have better support for interfaces (as said, you need to use $M+, and also no properties, because Delphi doesn't have RTTI for properties in interfaces)
I've added also your suggestion of ignoring the "Get" in methods when using interfaces, so while a property Name won't be recognized, if you have a method GetName you will be able to write <#data.Name> and FlexCel will know it has to call GetName.