Microsoft KB Archive/110120

{| = BUG: _PAGENO Wrong When Data Grouping & New Page Selected =
 * width="100%"|

ID: Q110120

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b

SYMPTOMS
The _PAGENO system variable is incremented incorrectly when the following three conditions are met:


 * A field in the Detail band stretches past one page.
 * There is a data grouping.
 * In the Group Info dialog box, the When Group Changes, Begin New Page check box is selected.

The _PAGENO system variable does not increment on the last page of the group if the Detail band extends past one page. For example, if the first group of a report has a Detail band that stretches from page 1 to page 3 of the report, the value for _PAGENO for pages 1 and 2 would be correct, but the value for page 3 would be 2. When the group changes on page 4, _PAGENO will be 4, which is correct. This behavior will continue throughout the report.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Steps to Reproduce Problem
1. Execute these commands:

CREATE TABLE grp_tst (notes M)    APPEND BLANK REPLACE notes WITH REPLICATE('X',10000) CREATE REPORT grp_tst.frx 2. Create a field in the Detail band and set the expression to  GRP_TST.NOTES. Select the Position Relative to Top--Field Can Stretch check box. Size the field so that it stretches across the whole page. 3. Create a field in the Page Footer band and set the expression to  _PAGENO. 4. From the Report menu, choose Data Grouping. Set the expression to  RECNO and select the When Group Changes, Begin New Page check box. 5. From the Report menu, choose Page Preview. Choose the Next button in the preview until you reach the last page. Note the value for _PAGENO. Now choose the Previous button, and note that the value for _PAGENO is the same. Additional reference words: FoxWin 2.50 2.50a 2.50b buglist2.50 buglist2.50a buglist2.50b KBCategory: kbtool kbbuglist KBSubcategory: FxtoolRwriter
 * }