Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Know how many pages in Report?
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01213476
Message ID:
01213645
Views:
15
>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
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Reply
Map
View

Click here to load this message in the networking platform