From: Subrata Bauri Subrata on
Dear all,

How to use the SETSELECTIONFILTER function to sum up of a columnar value in
realtime during lines selection ??


From: Peter D. J�rgensen on
> How to use the SETSELECTIONFILTER function to sum up of a columnar value
> in
> realtime during lines selection ??

Untested:

OnAfterGetCurrentRec:
MyTotal := 0;
CurrForm.SETSELECTIONFILTER(LocalRec);
IF LocalRec.FINDSET THEN
REPEAT
MyTotal := MyTotal + LocalRec.Amount;
UNTIL LocalRec.NEXT = 0;

Any problems in that? (Besides the performance...)

/Peter


From: Subrata Bauri on


"Peter D. Jørgensen" wrote:

> > How to use the SETSELECTIONFILTER function to sum up of a columnar value
> > in
> > realtime during lines selection ??
>
> Untested:
>
> OnAfterGetCurrentRec:
> MyTotal := 0;
> CurrForm.SETSELECTIONFILTER(LocalRec);
> IF LocalRec.FINDSET THEN
> REPEAT
> MyTotal := MyTotal + LocalRec.Amount;
> UNTIL LocalRec.NEXT = 0;
>
> Any problems in that? (Besides the performance...)
>
> /Peter
>
>
> .
> Yes , Sir. I have already tested it.
It does work correctly.