Possible improvement to TReport

Possible improvement to TReport

Postby Enrico Maria Giordano » Tue Oct 06, 2009 11:05 am

The following sample stops with an error:

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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Possible improvement to TReport

Postby MarcoBoschi » Tue Oct 06, 2009 2:21 pm

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

marco
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 37 guests