I need to do some aggregates using TClientdataset . In SQL, these aggregates can be executed using a script as follows:
Select Sum(column1) from table1 where Date_Column < Date_Value
Since I need more speed during a very long process and a very slow network, I want to use aggregates in memory instead of using sql. My idea is to add an aggregate to the ClientDataset with an expression as follows:
Sum(column1)
And make the Date_Column index, then filter the clientdataset file like this:
myClientdataset.SetRang([value1],[value2]);
I expected to see the cumulative result of this range, but, unfortunately, the aggregate ignores the range and continues to give the result of all the records!
, : TClientdataset? - , ?