--- In [email protected], "iqbal_delphidev" <iqbal_delphi...@...> wrote:
> many many Thanx Alex, Bob,,, > > but i way tring to get the summation from an excuted query not from table > > like > select sum (item_cost) > from <query01> > > can you advice? Hi, I am quite late in tracking this post trail. So, my reply may already be suggested earlier. Please ignore if that is the case. TClientDataSet allows for aggregate fields. You can attach your DataSet to a provider and further to a TClientDataSet object and then to Datasource. Once connected, you can use the client dataset as your were using the earlier dataset. (TDataset -> TDataSetProvider -> TClientDataSet -> TDataSource) Regarding your requirement, you can create aggregate fields in the client dataset and mention what kind of aggregate is needed (Sum, Min, Max, Count, etc). You can also do an aggregate based on an expression like "Sum(Field1 + Field2 - Field3)". Check help on "Using client datasets" for further information and examples. I guess there is also a demo program. HTH, Vishak

