Put the text in the PageFooter, Properties->PrintWhen & put _page = all_pages
Where You run the report:
all_pages = 0
REPORT FORM Myreport NOSHOW TO FILE test.txt
all_pages = _pagetotal
REPORT FORM Myreport ...
Also instead of this You can put in PrintWhen Expr. EOF("CursorForreport") but that I didn't tested & not sure if it works
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.