FIX: Report Writer incorrectly numbers pages of a report
Article ID: 149849
Article Last Modified on 2/11/2005
APPLIES TO
- Microsoft Visual FoxPro 3.0 Standard Edition
- Microsoft Visual FoxPro 3.0b Standard Edition
This article was previously published under Q149849
SYMPTOMS
In Visual FoxPro versions 3.0 and 3.0b, the first pages of data in a report
created by Report Writer are numbered incorrectly when the following three
conditions are met:
- There is a title page.
- Data grouping is set to reset the page number to 1.
- Data grouping is set to start each new group on a new page.
Using the Customer table as an example, if the first City in the table is
Adak, the Report Writer variable _pageno prints the number 2 instead of the
number 1 for the first page. If the second City is Boston, the first Boston
page will be correctly numbered 1, and all pages after it will be correctly
numbered.
WORKAROUND
The following workaround applies to the example given in the "More
Information" section below:
- Create a report variable named cOldcity. Type cOldcity in Value to
Store. Type city in Initial Value.
- Select Release After Report and Reset: End of Report.
- Replace the _PAGENO expression in the page footer with
IIF(cOldcity=city,_pageno-1,_pageno).
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. This problem has been fixed in
Visual FoxPro 5.0 for Windows.
Keywords: kbbug kbfix kbvfp500fix KB149849