Silvio,
works with any index :
using a FILTER
[color=#0000FF:cq7rvigv]nTop := ("CUST")->( RECCOUNT() ) - 4
("CUST")->( DBSETFILTER( {|| ("CUST")->( RECNO() ) >= nTop } ) )
("CUST")->( DBGOTOP() )[/color:cq7rvigv]
[b:cq7rvigv]or using ORDSCOPE with the same result :[/b:cq7rvigv]
[color=#008000:cq7rvigv]INDEX ON ("CUST")->( RECNO() ) TO "CUST1" // index on record-numbers
nTop := ("CUST")->( RECCOUNT() ) - 4
nBottom := ("CUST")->( RECCOUNT() )
("CUST")->( ORDSCOPE(0, NIL ) ) // reset
("CUST")->(ORDSCOPE(1, NIL ) ) // reset
("CUST")->(ORDSCOPE(0, nTop )) // set top scope
("CUST")->(ORDSCOPE(1, nBottom )) // set bottom scope
("CUST")->( DBGOTOP() )[/color:cq7rvigv]
[img:cq7rvigv]http://www.pflegeplus.com/IMAGES/Xbrwfilt1.jpg[/img:cq7rvigv]
regards
Uwe
↧