unidbgrid显示列的合计值
procedure TfrmClient.UniDBGrid1ColumnSummaryResult(Column: TUniDBGridColumn;
GroupFieldValue: Variant; Attribs: TUniCellAttribs; var Result: string);
var
f: Currency;
begin
inherited;
if SameText(Column.FieldName,'beginBalance') then
begin
f:=0;
ClientDataSet1.First;
while not ClientDataSet1.Eof do
begin
f:= f + Column.Field.Value;
ClientDataSet1.Next;
end;
Result :=formatCurr('¥0.00',f);
Attribs.font.Style:= [fsBold];
Attribs.Font.Color:= clNavy;
end;
end;
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/p/4420962.html