Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page Total Problem
Message
 
To
02/06/2008 11:09:54
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01320884
Message ID:
01321284
Views:
65
>Hi,
>Thank for your reply, can you suggest any
>solution for this case ?
>
>Derek

If you are running VFP9 SP2 .. there is another option. It's a little quirky .. but it does work. If you run the report with the fxListener class in the _ReportListener class library in the FFC directory, there's a trick you can pull by delcaring a few PUBLIC variables and setting up a "special effects" class provided in the FFC. Run the report using this code ..
PUBLIC _resetpagetotal, _reportpageno, _reportpagetotal
_ResetPageTotal = 0
_ReportPageNo = 0
_ReportPageTotal = 0

lorl = NEWOBJECT('fxListener', HOME() + 'ffc\_reportlistener')
lorl.ListenerType = 1
lorl.addcollectionmember('fxResetPageTotal', HOME() + 'ffc\_reportlistener', '', .t., .f., .f.)

REPORT FORM junk OBJECT lorl
In your report, tell the data group to reset the page number to 1 at each new group. Once you do that, the following variables can be used in the report:

_PageNo: This is the page number within the THIS group.
_ResetPageTotal: This is the total pages for THIS group.

If you want to ignore groups and know page numbers for the overall report, use these:

_ReportPageNo: This is the page number within the ENTIRE report.
_ReportPageTotal: This is the total number of pages for 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
Previous
Reply
Map
View

Click here to load this message in the networking platform