The information in this article applies to:
- Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0
- Microsoft Visual FoxPro for Macintosh, version 3.0b
SYMPTOMS
If you create a report with two or more data groupings with the "Reprint
Group Header on Each Page" check box 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
NOTE: For this workaround to work, each new outer grouping must start on a
new page.
Follow the steps in the "Steps to Reproduce Problem" section of this
article, and then make the following changes to the report:
- In the Data Grouping dialog box, select the shipper_id group, and select
the "Start Each Group on a New Page" check box.
- Move all fields from Group Header 1 to the Page Header (you may need to
enlarge the Page Header band), and shrink the Group Header 1 band height
to 0.
- Create a report Variable, and give it the following settings:
Name - grpcount
Value to Store - grpcount + 1
Initial Value - 0
Calculate - Sum
Reset - shipper_id
- Select all the fields in Group Header 2. Copy them, and then paste them
into the Page Header. On each of these new fields in the Page Header,
choose Print When, and in the "Print Only When Expression Is True" text
box, enter this expression:
grpcount = 0
Select the "Remove Line If Blank" check box.
- On all the fields in Group Header 2 choose Print When, and in the "Print
Only When Expression is True" text box, enter this expression
grpcount > 0
Select the "Remove Line If Blank" check box.
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.0a.
MORE INFORMATION
Steps to Reproduce Problem
- Open Orders.dbf from the Tastrade database located in the
Samples\Mainsamp\Data subdirectory.
- Create a new index tag named ShipCust on this expression:
shipper_id + customer_id
- Create a new report, and add the Orders table to the Data Environment.
- In the properties sheet of the Data Environment, in the Data tab of the
Cursor object, set the Order property to ShipCust.
- Add two Data Groupings to the report, the first (outer) being
shipper_id and the scond (inner) being customer_id. In both cases,
select the "Reprint Group Header on Each Page" check box.
- Add a label named Outer Group to the Group Header 1, and add a label
named Inner Group to the Group Header 2.
- Preview the report. Note that Inner Group prints above Outer Group on
the first page. It is also possible to arrange the report so that the
shipper_id changes between pages, in which case the problem repeats
itself on the first page that displays the new shipper_id.
REFERENCES
For more information about the technique used in this article, please see
the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q94343
TITLE : Obtaining Number of Data Groups in .FRX Without Using UDF
Keywords : buglist3.00 buglist3.00b buglist5.00 FxtoolRwriter vfoxwin vfpfix5.0a kbtool kbbuglist kbfixlist
Version : 3.0 3.0b 5.0
Platform : MACINTOSH WINDOWS
Issue type : kbbug
Solution Type : kbfix
|