Possible improvement to TReport

Post Reply
User avatar
Enrico Maria Giordano
Posts: 8770
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 7 times
Contact:

Possible improvement to TReport

Post by Enrico Maria Giordano »

The following sample stops with an error:

Code: Select all | Expand

#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
User avatar
MarcoBoschi
Posts: 1072
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: Possible improvement to TReport

Post by MarcoBoschi »

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
Post Reply