Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Total No. of Pages in a Report
Message
From
19/08/1998 21:45:15
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00128007
Message ID:
00128349
Views:
17
>Hi To All!
>
> What are the ways to know the Total No. of Pages in a report. I want to appear my page number as "Page no. # of #".
>
>Thanks and Hope somebody can help me.



In my view, I suggest you to find out the number of record printed per page!
For example, if you can print 12 records per page after you try it.

Then, the value of Total page will be:

CEILING(RECCOUNT()/Rec_Per_Page)

and thus the Page Statement will be:

"Pages " + rtrim(str(_pageno)) + " of " + rtrim(str(CEILING(RECCOUNT()/Rec_Per_Page)))

But if you use View with open Query:

i.e. Select .... where Master.MainKey = ?PrintKey
There will be two times to ask the PrintKey!!

So, if you set the variable with value already, it will work perfectly!

The most inconvient thing is to test out how many record per page!
Good Luck!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform