where ( reccno() between (i) and (i + lnBatchSize -1) )
lnBatchSize = 5000 >FOR i=1 TO Reccount( "YourCursorName" ) STEP lnBatchSize > Select * From YourTable ; > Where Reccno() BETWEEN i And i + lnBatchSize ; > Into Cursor YourCursorName > Report Form MyReport To Printer >ENDFOR>
>>i = 1 >>Do While .T. >> >> Select * From YourTable Where Reccno() > = i And Recno() <= i + 10000 ; >> Into Cursor YourCursorName >> i = i + 10000 >> >> If Reccount( "YourCursorName" ) > 0 >> Report Form MyReport To Printer >> Else >> Exit >> EndIf >> >>EndDo >>>>