>How can you know how many pages are in a report without using REPORT PREVIEW?
If you want to reference the total pages somewhere on the report output, just use _PAGETOTAL in the expression of some field object in the report. The VFP report writer will scan the frx before running and figure out that it has to do a dummy report pass to figure out the total pages and fill that system variable for you.
If you need the page count for some other reason that has nothing to do with printing on a report, you can do this:
REPORT FORM xyz TO FILE abc.txt
lnPageCount = _PAGENO
ERASE abc.txt