Hello Med.

Here is tmsebufdataset.sumfield:

What about only comment the first line after begin ?
Is it what you want?
If so, maybe we can add a parameter (, nocheck) or create a new procedure
without check (procedure sumfield_nocheck).

procedure tmsebufdataset.sumfield(const afield: tfield; out asum: double);
var
 int1,int2: integer;
 index1: integer;
 po1: precheaderty;
 po2: pprecheaderty;
 bo1,bo2: boolean;
 state1: tdatasetstate;
begin
 checksumfield(afield,[ftfloat,ftcurrency]); // This enable/disable ?
 index1:= afield.fieldno - 1;
 asum:= 0;
 bo1:= filtered and assigned(onfilterrecord);
 state1:= settempstate(tdatasetstate(dscheckfilter));
 try
  int2:= ffieldinfos[index1].base.offset;
  po2:= pointer(findexes[0]);
  if bo1 then begin
   for int1:= 0 to fbrecordcount - 1 do begin
    fcheckfilterbuffer:= pdsrecordty(pchar(ppointeraty(po2)^[int1])-
                                                          
sizeof(dsheaderty));
    bo2:= true;
    onfilterrecord(self,bo2);
    if bo2 and getfieldflag(@fcheckfilterbuffer^.header.fielddata.nullmask,
                                                             index1) then
begin
     asum:= asum + pdouble(pchar(@fcheckfilterbuffer^.header)+int2)^;
    end;
   end;
  end
  else begin
   for int1:= 0 to fbrecordcount - 1 do begin
    po1:= ppointeraty(po2)^[int1];
    if getfieldflag(@po1^.fielddata.nullmask,index1) then begin
     asum:= asum + pdouble(pchar(po1)+int2)^;
    end;
   end;
  end;
 finally
  restorestate(state1);
 end; 
end;


Or I miss something, so explain please.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to