2.50
WINDOWS
kbprg kbfixlist kbbuglist
The information in this article applies to:
- Microsoft FoxPro for Windows, version 2.5
SYMPTOMS
In the Report Writer, the "New Page (Page No. = 1)" option does not
function correctly. When you select the "New Page (Page No. = 1)"
option in the Group Info dialog box (to open the dialog box, choose
Data Groupings from the Report menu, then choose the Add button), the
page number is set back to 1 on the last page of a group that spans
more than one page.
RESOLUTION
To work around this problem, do the following:
- Create the following user-defined functions (UDFs):
a. Type the following in a file called SMYPAGE.PRG:
mypage = 1
RETURN " "
b. Type the following in a file called IMYPAGE.PRG:
mypage = mypage + 1
RETURN " "
- Create a memory variable called "mypage" (without the quotation marks).
You can do this by executing the following command
mypage = 0
either in the Command window or in the program that calls the report.
- In the Group Header band, create a field called "smypage()"
(without the quotation marks).
- In the Page Footer band, create a field called "mypage" (without
the quotation marks).
- To the right of the mypage field, create another field called
"imypage()" (without the quotation marks).
The mypage field will display the correct page number. It is important
to follow these steps in order because the fields will be called in
the order they are created. Otherwise, mypage could be incremented
prior to displaying the page number.
STATUS
Microsoft has confirmed this to be a problem in FoxPro 2.5 for
Windows. This problem was corrected in FoxPro 2.5a for Windows.
This problem does not occur in FoxPro 2.5 for MS-DOS.
MORE INFORMATION
Steps to Reproduce Problem
- Use the CUSTOMER.DBF file and set the order to STATE.
- Create a quick report in FoxPro for Windows using CUSTOMER.DBF.
- Set up a data grouping on STATE.
- In the Group Info dialog box, under "When Group Changes, Begin",
select the "New Page (Page No. = 1)" option.
- From the Report menu, choose Page Preview.
- Zoom in on the page number. On groups that span more than one page,
the page number on the last page of the group is set to 1 instead
of incrementing again.