From: Stefan on
Hi all

I have handcoded a report with ReportPro that is several pages long.
In the preview, the report is shown correctly. But when I print the
report and a new page is to be printed, the printer does not eject the
current page. The entire report is printed on one page. Can anyone
help me?

Stefan
From: Stephen Quinn on
Stefan

You need to return PRINT_OK at the end of each page.

Eg
METHOD PrintPageHeader( oPrinter, lPrint ) CLASS InvoicePRN
// Print Header Details
RETURN PRINT_OK

METHOD PrintPageBody( oPrinter, lPrint ) CLASS InvoicePRN

DO WHILE lWhatever
// Print Body Details

// Nearing the bottom of the page allowing 40 pixels for the Footer
IF SELF:oPrinter:CurrentProw + 40 >= SELF:oPrinter:nPageLength
// New Page - causes the Footer to print on this page and a
Header on the next page
RETURN PRINT_OK
ENDIF
ENDDO
IF ThisIsTheLastInvoice
RETURN PRINT_NOMORE
ENDIF

RETURN PRINT_OK

METHOD PrintPageFooter( oPrinter, lPrint ) CLASS InvoicePRN
// Print Footer Details
RETURN PRINT_OK

If your report isn't structured as above then show us your code, 20-30 lines
of relevant code should do.

CYA
Steve


From: Stefan on
Stephen

I have solved the problem, it was something else. Thanks anyway.