more report on the same document PDF

more report on the same document PDF

Postby MarcoBoschi » Mon Oct 05, 2009 2:58 pm

Hi,
I have to create more report on the same PDF file.
I use PDFCReator as printer.
I modified rep01.prg sample in samples\report folder I tried this:

#include "FiveWin.ch"
#include "report.ch"

FUNCTION MAIN()
LOCAL oPrn
LOCAL oReport1
LOCAL oReport2

PRINT oPrn TO "PDFCreator"

USE TEST

REPORT oReport1 TITLE "*** SECONDO REPORT ***" TO DEVICE oPrn

COLUMN TITLE "St" DATA Test->State
COLUMN TITLE "First Name" DATA Test->First
COLUMN TITLE " Salary" DATA Test->Salary

END REPORT

ACTIVATE REPORT oReport1

GO TOP

REPORT oReport2 TITLE "*** SECONDO REPORT ***" TO DEVICE oPrn

COLUMN TITLE "St" DATA Test->State
COLUMN TITLE "First Name" DATA Test->First
COLUMN TITLE " Salary" DATA Test->Salary

END REPORT

ACTIVATE REPORT oReport2

CLOSE DATABASE

RETURN NIL


I have this error
Application
===========
Path and name: C:\FWH\samples\report\rep01.exe (32 bits)
Size: 1,868,800 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 10/05/09, 16:56:55
Error description: Error BASE/1605 Invalid self: NEW
Args:
[ 1] = O TREPORT
[ 2] = U

Stack Calls
===========
Called from: .\source\classes\REPORT.PRG => TREPORT:NEW(286)
Called from: .\source\classes\PDREPORT.PRG => RPTBEGIN(44)
Called from: rep01.prg => MAIN(25)
User avatar
MarcoBoschi
 
Posts: 1015
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: more report on the same document PDF

Postby James Bott » Thu Oct 08, 2009 12:37 am

Marco,

This is just a wild guess, but perhaps the first report is still running when the second report starts. You could try something like:

do while oReport1!=nil
waitseconds(1)
enddo

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests