I would create a report global variable 'salessum'
var
salessum: extended;
procedure MYReportOnStartReport(Sender: TfrxComponent);
begin
salessum := 0.0;
end;
In the OnBeforePrint event of the detail band increment the salessum if it is one of the desired salesmen.
procedure MYReportDetailBeforePrint(Sender: TfrxComponent);
begin
if (mydata.salesmankey = "key 1") or (mydata.salesmankey = "key2") or (...) then
begin
salessum := salessum + mydata.amount;
end;
end;
If you want the extra sum at the end of the report then add a report summary band and in the OnBeforePrint event set the value of the appropriate text field to the formatted string of salessum.
procedure MYReportSummaryBeforePrint(Sender: TfrxComponent);
begin
txtMyBestSalesMenTotal.Text := FormatFloat('#,##0.00', salessum);
end;
Alternatively, if you want the extra sum immediately after the salesman 3 subtotal then add a text field in the salesman group footer band and in the OnBeforePrint event set its visible property to true/false depending on which salesman key you are currently processing and set its value to the value of salessum. You will also need to make sure that the band stretches automatically.
I have started to do pretty much all summing using script and report variable as it becomes so much easier to control when and where they should be incremented or reset or printed etc. Using the built in sum functions (in any reporting system) is only useful for very straightforward totals - which, for some reason, very few of my reports are.
Hope that makes sense (and is what you're actually trying to achieve!).