Besides what Sergey said about using a temp file to avoid any page number discrepancies .. you should also get the printer before doing this. Otherwise, the temp file you create will assume the default printer .. and then for the real report, the user could pick a different print. If the two different printers have different non-printable margins you could get a discrepancy in the page counts.
Cathy
>>HI Nicholas
>>
>>There is no way in VFP 5,6,7 but u can done it by this way
>>
>>Set the TOTALPAGENO as Public Variable
>>
>> Report form rptrun to x.prn Noconsole
>> TOTALPAGENO=_PAGENO
>> ERASE x.prn
>> Report form rptrun to Print Prompt Noconsole
>
>You can also leave out the "to x.prn" to avoid having to erase the temp file. Saves good time:
>
>Report form rptrun Noconsole
>TOTALPAGENO=_PAGENO
>ERASE x.prn
>Report form rptrun to Print Prompt Noconsole
>