- Code: Select all Expand view
- #include "FiveWin.ch"
#include "Report.ch"
FUNCTION MAIN()
LOCAL oPrn
PRINT oPrn TO "PDFCreator"
REP01( oPrn, "1" )
REP01( oPrn, "2" )
ENDPRINT
RETURN NIL
FUNCTION REP01( oPrn, cNum )
LOCAL oReport
USE TEST
REPORT oReport TITLE "TEST" + cNum TO DEVICE oPrn
COLUMN TITLE "St" DATA Test->State
COLUMN TITLE "First Name" DATA Test->First
COLUMN TITLE " Salary" DATA Test->Salary
END REPORT
oReport:CellView()
ACTIVATE REPORT oReport
CLOSE TEST
RETURN NIL
The reason is that the printer is closed in End() method. Can it be closed only if it is not provided externally through the TO device clause?
EMG