Hello Fred,
You did a lot . Now DoSum becomes:
procedure tfrmbasePagefo.DoSum(oDbGrid: TDbwidgetgrid; iRow:integer);
var iCol:integer; oField:TField; n:currency;
begin
with oDbGrid,oDbGrid.datalink.datasource do
for iCol:=0 to datacols.count-1 do
with datacols[iCol] do
if tag>0 then
begin
oField:=dataset.fields[tag-1];
tmsebufdataset(DataSet).sumfield(oField,n);
with tBCDField(oField),fixrows[iRow].captions[iCol] do
begin
if currency then
caption:=currtostrf(n,ffcurrency,precision,defaultFormatSettings)
else caption:=currtostrf(n,ffnumber,
precision,DefaultFormatSettings);
case ord(alignment) of
0:caption:=PADRIGHT (caption, displaywidth);
1:caption:=PADLEFT (caption, displaywidth);
2:caption:=PADCENTER(caption, displaywidth);
end;
end; end; end;
But how do you call this patch an upgrade to 5.4.1 or just a hidden because
not all programmers want to sum integer into currency?
By the way the new FPC compiles well MSEIDE-MSEGUI.
Med
________________________________
De : fredvs <[email protected]>
Envoyé : dimanche 23 mai 2021 21:15
À : [email protected]
<[email protected]>
Objet : Re: [MSEide-MSEgui-talk] BufDataset
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
<http://mseide-msegui-talk.13964.n8.nabble.com/file/t2/msebufdataset.zip>
This one enable (I hope) to add integer-fields into currency variable.
I did some test to add integers into a currency/float variable and did not
note problems.
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