Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Page x of y in a group
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01334332
Message ID:
01334483
Vues:
26
>Hi.
>I have a report sorted by a Group and want to Print Page x of Y within the Group, i.e.
> reset the No.of pages at the end of each group i.e.
>Group
>01 1 of 3
>01 2 of 3
>01 3 of 3
>02 1 of 4
>02 2 of 4
>02 3 of 4
>02 4 of 4
>etc
>Thanks in advance
>Regards,
>Gerard

If you are using VFP 9 SP2 ... you can do this:

In your report, set the data group to start with page 1. Use _ResetPageTotal instead of _PageTotal to print the page count on the report. Run the report using this code:
PUBLIC _ResetPageTotal, _ReportPageNo, _ReportPageTotal
LOCAL loRL
loRL = NEWOBJECT('fxListener', HOME() + 'ffc\_reportlistener')
loRL.ListenerType = 1
loRL.AddCollectionMember('fxResetPageTotal', ;
	HOME() + 'ffc\_reportlistener', '', .t., .f., .f.)
REPORT FORM MyReport OBJECT loRL
_ResetPageTotal will contain the total page count for the current group.
_ReportPageNo will contain the page number of this page within the entire report (ignoring groups).
_ReportPageTotal will contain the total number of pages in the entire 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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform