Is there a way to populate data from nested/hierarchical object lists rather than relational table, when you use templates? Most of the examples use relational data and matching Named ranges to populate data onto the final report. It extensively uses AddTable, AddRelationship methods to create the data model. Are there samples that shows FlexCel handling hierarchical data?
Most demos are indeed using a database, because they existed long before we added support for TList<>, and because it doesn't matter in most cases. The demo mostly shows the templates, and the data is always the same (a northwind database).
But there is a demo with TList:
<Install folder>\TMSSoftware\FlexCelVCLNT\Demo\Delphi\Modules\20.Reports\22.Reports From Lists
Note that you still need to use AddTable to use the TList. And you can use implicit relationships (as in the case where an object has a TList of other objects), or also explicit relationships with AddRelationship if you want to. This example shows both ways: explicit and implicit. While you normally would use implicit, explicit via addrelationship can enable interesting stuff.
The example shows both: explicit and implicit relationships. It could maybe be 2 separate demos, but we already have too much demos...
Categories is implicitly related to Elements, because the class Catergories contains an array of Elements. Note that there is no added relationship between Elements and Categories, and we don't even call AddTable("Elements"). Elements is implicitly added when we add Categories.
On the other hand, the table Elements is not related at all with ElementNames. ElementNames is just a List<ElementName> and there is no information for FlexCel to know which elements in ElementName map to which elements in Elements. So to relate Elements and ElementNames, you need to add an explicit relationship:
ElementName: Not related to Categories or Elements, so we need an explicit relationship.
Of course the example is not how most real world apps will work. You will likely have all implicit relationships (so ElementName would be a property in the table Elements), or you will have all explicit (Categories, Elements and ElementName would be 3 independent tables, and you would relate them explicitly with AddRelationship).
But you can mix and match as in this example, sometimes it makes sense, and this way we have a simple demo to show both. As said, they could be separate demos (LINQ with explicit relationships/ LINQ with implicit relationships), but I don't think it is worth.