I use Tdatabase and made a Set filter as you can see on this method
- Code: Select all Expand view RUN
- METHOD Load_Data(nCount) CLASS TLOTTO
local aTemp := {}
local nLastRecords,nInit,nEnd
DEFAULT nCount := 10
::olotto := TArchivioLotto():New()
::olotto:SetOrder(1)
::olotto:goBottom()
IF nCount > 0
nInit:=::olotto:lastrec()-nCount
nEnd:= ::olotto:lastrec()
ENDIF
::olotto:Exec( <||
SET FILTER TO ( nInit <= ::olotto:RECNO() .AND. ;
nEnd >= ::olotto:RECNO() )
return nil
> )
::olotto:gotop()
xbrowser ::olotto
::olotto:ArrayToDBF( atemp, , nil, .t., .t. )
xbrowser aTemp
return aTemp
on this picture I use the dbf not the array
I don't understand why I don't care about a record on array aTemp, obviously I'm using the database and have an nInit/nEnd filter for the last records, by default the number of records to display is 10 until the final user should check the possibility of caricature at least fine at 500 through a combobox to select ( 10,20,30,50,100,200,300,500)
any help please