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.