You need to run the report twice.
REPORT FORM MyReport TO FILE Dummy.TXT NOCONSOLE
nTotPages = _PAGENO
REPORT FORM MyReport TO PRINTER
nTotPages is the total number of pages. You need to run it to a file the first time. Just running it to the console sometimes causes the total page count to be incorrect.
>In vfp6 I have designed a number of reports showing the Page Number with the 'pageno' variable in the report designer field expression builder.
>
>However I want to be able to show "Page x of y" where x = current page and y = total number of pages on the report. I cannot find any such variable?
>
>Any ideas will be gratefully received
>
>Peter
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer