Ha, OK, indeed, nicer.
(But I like your first peace of code too.)
For the new code, maybe using a variant variable and create a new sumfield()
procedure:
procedure tmsebufdataset.sumfield(const afield: tfield; out asum: variant);
But for this, we need a variant-guru (I am beginner in variant ty
I want to change this peace of code
procedure tfrmbasePagefo.DoSum(oDbGrid: TDbwidgetgrid; iRow:integer);
VAR n:currency; nn:integer; iCol:integer; oField:TField;
begin
with oDbGrid,oDbGrid.datalink.datasource do
for iCol:=0 to datacols.count-1 do
with datacols[iCol] do
if tag>0 then
begi
Re-hello Med.
> Now summing ftinteger FIELD into currency VAR gives 0 ?
Sorry but I dont understand.
Why do you want to sum ftinteger field into a currency var?
Why not sum ftinteger field into a integer var and after this, convert the
integer var into a currency ?
--
Sent from: http:/
> Now summing ftinteger FIELD into currency VAR gives 0 ?
Please, give code example, it is really difficult to understand otherwise.
--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/
___
mseide-msegui-talk mailing list
mseide-mse
Re Hello
Now summing ftinteger FIELD into currency VAR gives 0 ?
Med
De : fredvs
Envoyé : mardi 18 mai 2021 16:05
À : mseide-msegui-talk@lists.sourceforge.net
Objet : Re: [MSEide-MSEgui-talk] BufDataset
> An other option is possible
> We can set aFields.o
> An other option is possible
> We can set aFields.optionsfield of_user0 to (true or false )
Nice too. (but more tricky).
Fre;D
--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/
___
mseide-msegui-talk mailing list
mseide-msegui-talk
Hello Med.
> What do you think?
I would vote for this (set bCheck default to true for compatibility with
previous code):
procedure msebufdataset.sumfield(const afield: tfield; out asum: double;
bCheck: boolean = true);
And do it for all the other sumfield() (integer, currency, float, etc).
F
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]
El 18/05/2021 a las 15:28, mohamed hamza escribió:
Hi All,
I found Firebird System easy to implement then I use it with
flamerobin tool to setup my database.
Med
Ps : Firebird is Interbase in delphi I believe ?
No, they are different DB.
Embarcadero, or Borland, or whoever was in 20
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
Hello Fred,
With this below piece of code I do not want to test oField.datatype and doing
the sum to n where n is VAR:currency
procedure tfrmbasePagefo.DoSum(oDbGrid: TDbwidgetgrid; iRow:integer);
VAR n:currency; nn:integer; iCol:integer; oField:TField;
begin
with oDbGrid,oDbGrid.datalink.d
Hello Med.
> In the SRC of msebufdataset.pas there is a function to check that (
> checksumfield) and abort the task.
Hum, in msebufdataset.pas I see a "procedure checksumfield" not a "function
checksumfield":
procedure tmsebufdataset.checksumfield(const afield: tfield;
Hi All,
I found Firebird System easy to implement then I use it with flamerobin tool
to setup my database.
Med
Ps : Firebird is Interbase in delphi I believe ?
De : fredvs
Envoyé : lundi 17 mai 2021 20:15
À : mseide-msegui-talk@lists.sourceforge.net
Hi all,
The demo Prj I sent later ( ifi,dbfilter ) use sumfield () . This
procedure can be used to add a sum column in dbgrid for example.
But this Martin's does not allow to mix field type. We can not use currency
or real var to sum an integer var
Procedure DoSum()
Var nCur:currency;
14 matches
Mail list logo