delphyst
asked on
running total ?
well, i want to make a invoice form using master detail relation but i got problem to show total ammount of detail item. Help me please.
delphyst,
use a query for it or make your detail also a master of another detail (=> this one calculates total of detail).
Zif.
use a query for it or make your detail also a master of another detail (=> this one calculates total of detail).
Zif.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
See example in Delphi 3\Demos\DB\CtrlGrid\CtrlGr id.dpr
procedure TDM1.CalculateTotals(Sende r: TObject; Field: TField);
In short
Detail.disableControls; { hide this process from the user }
Detail.first;
while not Detail.eof do
begin
// calculate Totals
Detail.next;
end;
Detail.first;
Detail.enableControls; { restore the display }
If you want only total ammount of detail item
use Detail.RecordCount
procedure TDM1.CalculateTotals(Sende
In short
Detail.disableControls; { hide this process from the user }
Detail.first;
while not Detail.eof do
begin
// calculate Totals
Detail.next;
end;
Detail.first;
Detail.enableControls; { restore the display }
If you want only total ammount of detail item
use Detail.RecordCount
ASKER
-TTable both for master and detail