Bug in TReport

Bug in TReport

Postby Enrico Maria Giordano » Sun Aug 27, 2017 8:19 am

After closing the preview the program crashes with an error and it shows only the first report (the two reports should be in the same preview window):

Code: Select all  Expand view
#include "FiveWin.ch"
#include "Report.ch"


FUNCTION MAIN()

    LOCAL oWnd

    DEFINE WINDOW oWnd

    ACTIVATE WINDOW oWnd;
             ON INIT ( REPORTS(), oWnd:End() )

    RETURN NIL


STATIC FUNCTION REPORTS()

    LOCAL oPrn

    PRINT oPrn PREVIEW
        REP01( oPrn, "1" )
        REP01( oPrn, "2" )
    ENDPRINT

    RETURN NIL


STATIC FUNCTION REP01( oPrn, cNum )

    LOCAL oRpt

    USE TEST

    REPORT oRpt 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

    oRpt:CellView()

    ACTIVATE REPORT oRpt

    CLOSE TEST

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8243
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Return to Bugs report & fixes / Informe de errores y arreglos

Who is online

Users browsing this forum: No registered users and 5 guests