if qryformx.Active then
qryformx.Close;
qryformx.createdataset;
qryformx.Open;
qryformx.AddIndex(‘qryformxIndex1‘,‘pzh;bm;mc;ybbm;ybmc;sglxbm;sglx;sgysbm;sgys‘,[],‘‘, ‘‘,9);
{ 给数据集指定此索引 }
qryformx.IndexName := ‘qryformxIndex1‘;
qryformx.Close;
with TAggregateField.Create(Self) do begin
FieldName := ‘pricesum‘;
Expression := ‘Sum(price)‘;
IndexName := ‘qryformxIndex1‘;
GroupingLevel := 9;
Active := True;
OnGetText := qryformxpricesumGetText;
DataSet := qryformx;
end;
qryformx.open;
qryformx.AggregatesActive := True;
时间: 2024-11-08 09:57:35