Hi,
Hi,
About the documentation in TVirtualDataTable/TVirtualDataTableState you are right that indeed we should provide at least an example. You could actually look at the FlexCel code for the 2 implementations of TVirtualDataTable/TVirtualDataTableState we currently have, but those are probably too complex as a general example. The reason for lack of docs in this part is that well, moving the report engine from .NET (including all the demos) was a huge lot of work, and some stuff that is not really that much used was left out. TVirtualDataTables today aren't as needed as in the v3 era because we can directly use TList<> TArrays<> as datasources.
I do think the idea to add some json support from us (either as a demo or built in) is interesting.
But in the meantime, can't you just load the JSON data in a TDataSet and use that as datasource? If you have Delphi enterprise, I think FireDAC comes with a mem table that can load JSON directly. I am not sure about other options, but I guess this should be a common feature in TDataSets.
Anyway, a direct way to load json datatables sounds nice, so I'll see if we can add it.
ok, have successfully created the most simple implementation of a TVirtualDataTable descendant by orienting at TDatasetVirtualTable. TDatasetVirtualTable is pretty straight forward and simple enough.
Just to make sure, I magine you have already, but make sure to read the docs in FlexCel.NET of VirtualDataTable and VirtualDataTableState (the 2 classes you have to implement). They are in appendix II here:
http://www.tmssoftware.biz/flexcel/docs/net/UsingFlexCelReports.pdf
And while for .NET, they are basically the same.
The complexity comes from what you want to support: Stuff like allowing Lookups in the data or Distinct need to implement corresponding methods, but if you don't want, you don't need to implement them. The specific functionality just won't be supported in the report. (for example the user won't be able to use DISTINCT in the config sheet if you don't implement the corresponding method.
To implement implicit child lists you need to override GetRelationWith and return the related tables there.
I'll try to come up with an example for the weekend.