If (DBGrid1 Fields [1]. The Value & lt;> ") then
The begin
Label11. Caption:=IntToStr (StrToInt (Label11. Caption) + 1);
Label4. Caption:=FloatToStr (StrToFloat (Label4. Caption) + Query1. FieldByName (' zje.) AsFloat);
end;

CodePudding user response:
This is taken out of the database, you can display sum in the database before,CodePudding user response:
I want to write how to write in this cycleCodePudding user response:
Query1. First;//very important
Je:=0;
While not query1. Eof do
The begin
Je:=je + query1 fieldbyname (' zje.) asfloat;
Query1. Next;
end;
CodePudding user response:
Can convert DBGridEh, data aggregation function is very powerful,CodePudding user response:

This is DBGridEh upstairs said, which is EhLib controls,
This example I haven't written a single line of code,
Is this appearance design phase,

I have uploaded the latest version in CSDN, my own crack,
CodePudding user response:
Recommended DBGridEh, the bottom line, it has combined function,CodePudding user response:
Drag can realize several label to go up, with SQL commands, and assignment multi-purpose SQL commands, than that, the control or follow the system update, not the three parties to updateCodePudding user response:
A lot of things to use DBGridEh, provinceCodePudding user response:
Use DBGridEh, set a few properties,