FIX: "Reprint group header on each page" option causes malfunctions in Visual FoxPro for Windows 3.0 and in Visual FoxPro for Windows 3.0b (149068)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
This article was previously published under Q149068 SYMPTOMS
If you create a report with two or more data groupings with "Reprint Group
Header on Each Page" selected for all data groupings, the groupings will
print in incorrect order on the first page and on subsequent pages when a
new outer grouping starts on a new page.
WORKAROUND
Follow steps 1-7 in the "Steps to Reproduce Problem" section of this
article. Then create and run the following program:
STORE .T. TO lFlag1
REPORT FORM myreport TO PRINT && or PREVIEW
PROCEDURE PgHead
lFlag1 = .T.
PROCEDURE Grp1
lFlag1 = .F.
Now make the following changes to the report:
- Double-click the Page Header bar, and in the Page Header dialog box,
type the following as the On Entry expression:
- Double-click the Group Header 1 bar, and in the Group Header dialog box,
type the following as the On Exit expression:
- For every object in Group Header 2, add the following expression in the
Print When dialog box:
- Select the "Remove Line If Blank" check box.
It is possible to expand on this technique. For example if you have three
data groupings and you want to reprint the group header on each page, make
the following changes to the program:
- Modify the first line of the program to:
STORE .T. TO lFlag1, lFlag2
- Add the following line to the PgHead procedure:
lFlag2 = .T.
- Add a procedure:
PROCEDURE Grp2
lFlag2 = .F.
- Modify the report, adding Grp2() as the On Exit expression for Group
Header 2. Then for every object in the third group, add the following
as the "Print Only When Expression Is True" condition:
lFlag1 = .F. AND lFlag2 = .F.
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.
Modification Type: | Major | Last Reviewed: | 2/8/2005 |
---|
Keywords: | kbBug kbfix kbvfp500fix KB149068 |
---|
|