Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get 'Page x of y' to work on reports?
Message
 
To
06/04/2001 08:44:50
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00492748
Message ID:
00492807
Views:
13
Robert, try to

REPORT FORM FRX\RECHNUNG to FILE dummy.prn NOCONSOLE
DELETE FILE dummy.prn

Sending to SCREEN NOCONSOLE may give incorrect results.


>Hi all,
>
>I guess my problem has been discussed in UT several times, but obviously I am too stupid to get something like "Page x of y" into my reports.
>
>The problem: on a multi page report I have the wrong number of total pages (not always, but most of the time), e.g. on a three page report the pages will show "Page 1 of 2", "Page 2 of 2", "Page 3 of 2".
>
>What I am trying to do is to print the report into nirvana and then fill a private variable with the content of _PAGENO. It looks like this:
[...]
>REPORT FORM FRX\RECHNUNG NOCONSOLE
>pnNumberOfPages = _PAGENO
>IF vlPrint
>  FOR i = 1 TO lnNumberOfCopies
>    REPORT FORM FRX\RECHNUNG TO PRINTER NOCONSOLE
>  ENDFOR
>ELSE
>  REPORT FORM FRX\RECHNUNG NOCONSOLE PREVIEW
>ENDIF
>[...]
>
>In the report pnNumberOfPages is used to fill the y in "Page x of y", while _PAGENO is used to fill the x.
>
>Am I missing something?
>
>TIA Robert
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform