PRIVATE nLastPage && Must not be local or the report won't see it nLastPage = 0 REPORT FORM whatever TO FILE NOCONSOLE nLastPage = _PAGENO * At this point, nLastPage has the last page number * In the report, you can check if _PAGENO = nLastPage REPORT FORM whatever TO PRINT && or preview