Re: [MSEide-MSEgui-talk] BufDataset

2021-05-23 Thread fredvs
Hello Med. The last for tonight. Could you try changing your /mseide-msegui/lib/common/db/msebufdataset.pas with the one in attachment? msebufdataset.zip This one enable (I hope) to add integer-fields into currency

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-23 Thread fredvs
Hi Med + Sieghard. I would propose this: procedure tmsebufdataset.sumfield(const afield: tfield; out asum: currency); var int1,int2: integer; index1: integer; po1: precheaderty; po2: pprecheaderty; bo1,bo2: boolean; state1: tdatasetstate; begin

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-23 Thread fredvs
Re-re-re hello Med. Hello Sieghard. After deeper look into procedure tmsebufdataset.sumfield(const afield: tfield; out asum: currency); Here my conclusion: There are only: case ffieldinfos[afield.fieldno-1].base.fieldtype of ftbcd: ftfloat: And I dont see really why tfinteger: is banned.

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-23 Thread Sieghard
Hello mohamed hamza, Du schriebst am Sun, 23 May 2021 09:02:31 +: >Many thanks for your help. But this does not explain why we can > not sum integer field into a currency VAR with Martin's sumField > Procedure? Maybe it does, as his if statement seems to be directed toward the

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-23 Thread fredvs
Hello Med. > There is probably a raison? It seems that Martin wanted that the field-type is the same as out-sum variable. It is the reason why he added the "checksumfield" method at init of each "sumfield" method. But why, I dont know (because your code shows that it is possible to add integer

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-23 Thread mohamed hamza
Re-Hello Fred, I do not think so. I have to understand why Martin did like that. There is probably a raison? Med. De : fredvs Envoyé : dimanche 23 mai 2021 14:46 À : mseide-msegui-talk@lists.sourceforge.net Objet : Re: [MSEide-MSEgui-talk] BufDataset

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-23 Thread fredvs
Re-hello med. > s:=s+query.fieldbyname( < INTEGERFIELD>).value; Ha, maybe I get it. If I understand ok, with your code it works, but with Martin's code using sumfield() it does not work. If so, do you think it would be possible to create a new sumfield() that uses your code and that will work?

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-23 Thread fredvs
Hello Med. OK (but for me only part of code you give is like you are talking in Martian). Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-23 Thread mohamed hamza
Hello Fred, Same error with All ver . By the way I did VAR s:currency; s:=0; while not ( query.eof ) begin s:=s+query.fieldbyname( < INTEGERFIELD>).value; quey.next; end; I had not an error. Med De : fredvs Envoyé : dimanche 23 mai 2021 13:42 À :

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-23 Thread fredvs
Hello Med. > we can not sum integer field into a currency VAR with Martin's sumField > Procedure? Does it happen only with last msegui 5.4.0 or was it the case with previous version 4.6.0 too? Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

Re: [MSEide-MSEgui-talk] BufDataset

2021-05-23 Thread mohamed hamza
Hi Sieghard Many thanks for your help. But this does not explain why we can not sum integer field into a currency VAR with Martin's sumField Procedure? Med De : Sieghard Envoyé : jeudi 20 mai 2021 19:24 À : mseide-msegui-talk@lists.sourceforge.net Objet :