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:
01213755
Views:
28
Cecil

In the code below, tester is a table containing enough records to create a ten page report using report form tester.

wsglistenerlib contains a basic preview listener class that we use to preview reports.

Changing the listnertype to 3 says you want to render the report, but not output it quite yet.

After the rendering, the pagetotal property contains the page count


CLOSE ALL
USE tester
GO top
SET CLASSLIB TO wsglistenerlib
oWsgPreviewListener = CREATEOBJECT("wsgpreviewlistener")
oWsgPreviewListener.listenertype = 3
REPORT FORM tester OBJECT oWsgPreviewListener
WAIT WINDOW STR(oWsgPreviewListener.pagetotal)
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform