>>Why include RANGE when you're specifying the whole report?
>>
>>Because printer dialog always has the option of "Pages: 1-65534". I want to change 65534 to actual total pages.
>
>You'd have to run the report invisibly first, to let the report calculate the _pagetotal.
I don't think you should run the report more than once. VFP do this for you when _pagetotal is in the report.
CREATE CURSOR Test (Fld1 I, Fld2 C(30))
FOR lnFor =1 TO 300
INSERT INTO Test VALUES (lnFor, REPLICATE("A",lnFor))
NEXT
IF NOT FILE("Test.FRX")
CREATE REPORT Test FROM Test
ENDIF
MODIFY REPORT Test
REPORT FORM Test NOCONSOLE TO PRINTER PROMPT PREVIEW
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.