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 would do something like this:
>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 >>