那肯定是你哪个属性没设置正确,或者是没设置,这是我调试过的,可以
我想你可能是没有设置ClientDataSet的IndexName
下面是ClientDataSet的相关属性:
object ClientDataSet1: TClientDataSet
Aggregates = <
item
Active = True
AggregateName = 'MyAggregate'
Expression = 'sum(je)'
GroupingLevel = 1
IndexName = 'cdsIndex1'
Visible = False
end>
AggregatesActive = True
FieldDefs = <>
IndexDefs = <
item
Name = 'cdsIndex1'
Fields = 'zb'
GroupingLevel = 1
end>
IndexName = 'cdsIndex1'
Params = <>
ProviderName = 'provider1'
RemoteServer = DCOMConnection1
StoreDefs = True
Left = 168
Top = 128
end
看把细点,挨个设置……