Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Report
Miscellaneous
Thread ID:
00817974
Message ID:
00819027
Views:
11
Craig,

There's one more flaw to consider if you are printing the report. If you need to print to a printer, you must prompt the user for the printer first with SYS(1037). Otherwise, the report could get printed using driver A in the dummy print, then the user could pick Printer B for the real printing. The problem is that Printer A and Printer B might have different non-printable margins .. which means they could break at different points causing a different page count!!

Cathy


>There is one flaw in this method. Under certain conditions, which are somewhat obscure, the final page count will be off by one. The fix is to run the report to file the first time.
>
>REPORT FORM MyRep NOCONSOLE TO FILE MyFile.txt
>lnPages = _PAGENO
>ERASE MyFile.txt
>REPORT FORM myRep Preview
>
>
>>Hi Robert
>>
>>You have to print the report with NOCONSOLE
>>store the number of pages which will be held in _PAGENO
>>then print the report again.
>>
>>lnPages=0 && Must init before rep
>>REPORT FORM myRep NOCONSOLE
>>lnPages=_Pageno && last Page of Rep
>>REPORT FORM myRep Preview
>>
>>Like so.
>>
>>Nick
>>
>>>How can i know the number of page of a report ?
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