Hello Fred; I think we have to change the code msebufdataset.pas in this case we have not to duplicate the source (sumfiled ) in our project.
procedure msebufdataset.sumfield(const afield: tfield; out asum: double; bCheck:boolean); if bCheck then checksumfield(afield,[ftfloat,ftcurrency]) An other option is possible We can set aFields.optionsfield of_user0 to (true or false ) What do you think? Med ________________________________ De : fredvs <[email protected]> Envoyé : mardi 18 mai 2021 14:48 À : [email protected] <[email protected]> Objet : Re: [MSEide-MSEgui-talk] BufDataset 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
_______________________________________________ mseide-msegui-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

