Hello guys,
Thanks a lot for your answer.
Here is my example :
- Code: Select all Expand view
cFilt := "(AG->AGDATUM = US->UPRDATV" + IF(US->UVERTODO,")"," .OR. (AG->AGDATUM < US->UPRDATT .AND. !AG->AGAFGESL .AND. AG->AGAGRAP))")
IF UPPER(ALLTRIM(UsTab[LEN(UsTab)])) <> "ALLE GEBRUIKERS"
cFilt += " .AND. ("
FOR i=1 TO LEN(UsTab)
cFilt += ("VAL(AG->AGUSER) = " + ALLTRIM(RIGHT(UsTab[i],7)))
IF i <> LEN(UsTab) ; cFilt += " .OR. " ; ENDIF
NEXT
cFilt += ")"
ENDIF
//Order key = "AGUSERNS+AGUSER+LEFT(AGBTIJD,2)+RIGHT(AGBTIJD,2)+LEFT(AGETIJD,2)+RIGHT(AGETIJD,2)+DTOS(AGDATUM)"
SELECT AG
SET ORDER TO 21
SET FILTER TO &cFilt
It works very well, but soooo slowly.
The order key :
AGUSERNS = name of person
AGUSER = the person's internal code (C 7)
The order has to be that way because I need to make calculations per person and per day and the result has to be shown alphabetically.
Thanks a lot in advance for your help.