Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page Numbers
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
00623939
Message ID:
00623960
Views:
11
Glenn,

VFP doesn't allow you to know how many total pages there are until you've printed the report once (the number of pages is stored in _PageNo).

So by running the report once hidden and once shown you can get the Page 1 of 12 effect. Here is the code that I use.
PRIVATE pnTotalPages
pnTotalPages = 0
REPORT FORM myReport NOCONSOLE && Do the report once to find page #'s
pnTotalPages = _PageNo
REPORT FORM myReport NOCONSOLE TO PRINTER
On your report put in something like:
"Page: " + _PageNo + " of " + pnTotalPages
The biggest downfall of this is that you are running the report twice, which basically doubles the time to make the report.
Previous
Reply
Map
View

Click here to load this message in the networking platform