The following sample stops with an error:
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
#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 NILThe 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