Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
System Variable for Total No. of Pages?
Message
 
À
16/05/2001 12:59:00
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00507933
Message ID:
00508064
Vues:
24
>Chuck,
>
>The accepted way is to print the report first to a file, get the total pages, then print to paper. So if you use a variable TotalPages it your report it would look like this:
>
REPORT FORM MyReport to FILE TempRept.prn NOCONSOLE
>TotalPages = _PageNo
>DELETE FILE TempRept.prn
>REPORT FORM MyReport TO PRINT NOCONSOLE
>
>It doesn't take long to print to the file and it gets you the right number of pages.

To add to this suggestion ... if you want to use the PROMPT clause so the user can choose the printer instead of going to the default printer, make sure you do it this way instead:

>
=SYS(1037)
REPORT FORM MyReport to FILE TempRept.prn NOCONSOLE
TotalPages = _PageNo
DELETE FILE TempRept.prn
REPORT FORM MyReport TO PRINT NOCONSOLE
Otherwise, you may have an issue with the printable area being different between the default printer and the one chosen by the user. That could potentially mean that the "TO FILE" report would have a slightly different page count than the "TO PRINT" report because the number of lines that can fit on the page may be slightly different.

Cathy
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform