Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_pagetotal when chaining reports
Message
 
À
22/08/2007 07:27:40
Bruno Maddalozzo
Informatica Aziendale
Arsie, Italie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01249536
Message ID:
01249550
Vues:
18
You have to preprocess the report yourself and use your own variable .. not the system variable. Use this code to run the report and in the report use lnPages instead of _PAGETOTAL.
LOCAL lnPages, lcTemp
lnPages = 0
lcTemp = FORCEEXT(SYS(2015), '.txt')

WAIT WINDOW 'Preprocessing report...' nowait
REPORT FORM Report1 NOCONSOLE TO FILE &lcTemp NOPAGEEJECT
REPORT FORM Report2 NOCONSOLE TO FILE &lcTemp NORESET
lnPages = _PAGETOTAL
ERASE (lcTemp)
WAIT CLEAR 

REPORT FORM Report1 TO PRINTER PROMPT PREVIEW NOPAGEEJECT
REPORT FORM Report2 TO PRINTER PROMPT PREVIEW NORESET
>I'm chaining two reports, using the report listener.
>Let's say:
>ReportA, which produces 20 pages
>ReportB, which produces 5 pages.
>I've the need to print all pages with page numbering x/y i.e.
>page 1 of 25, 2 of 25 ...
>I can't use _pagetotal, which always return 20 after ReportA is processed
>so I would get
>Page 20 of 20 and then page 21 of 25 (when ReportB is processed).
>How can I get _pagetotal keep the whole page count?
>
>TIA
>Bruno
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