FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Possible improvement to TReport
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Possible improvement to TReport
Posted: Tue Oct 06, 2009 11:05 AM
The following sample stops with an error:

Code (fw): Select all Collapse
#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
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Possible improvement to TReport
Posted: Tue Oct 06, 2009 02:21 PM

Enrico,
in my opinion is very useful to concatenate more reports into a single one!
Thanks for your interest.

marco

Marco Boschi
info@marcoboschi.it

Continue the discussion