Microsoft KB Archive/168527
Article ID: 168527
Article Last Modified on 2/12/2007
- Microsoft Visual FoxPro 3.0 Standard Edition
- Microsoft Visual FoxPro 3.0b Standard Edition
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 5.0a
- Microsoft Visual FoxPro 6.0 Professional Edition
- Microsoft Visual FoxPro 7.0 Professional Edition
- Microsoft Visual FoxPro 8.0 Professional Edition
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q168527
Visual FoxPro has a limitation on the length of report bands. The maximum length for a single band is the page length.
To create a sample report demonstrating this behavior, complete the following steps:
- Create a new report.
- Make a Quick Report using Report/Quick Report from the Visual FoxPro menu.
- Select the Customer table in the VFP\Samples\Data directory for Visual FoxPro versions 3.0 and 5.0 or the home(2)+"data" directory for Visual FoxPro 6.0 when prompted for a table.
- From the Quick Report dialog box, select the right-most "Field layout" button, and then click OK.
- In the Report Designer, set up a data grouping. This is done by selecting Report/Data Grouping from the menu. In Visual FoxPro 9.0, select Report/Optional bands from the menu.
- In the "Group expressions" box, type the expression "RECNO('customer')", without the outer quotes, into the top box. Optionally, you may select the "Start each group on a new page" check box to start each new virtual detail band on a new page. Click OK to close the dialog box.
- Double-click on the Page Header separator bar, and set the Page Header height to .25", and select the "Constant band height" check box.
- Double-click on the Page Footer separator bar, and set the Page Footer height to .25".
- To simulate a two-page "detail band," set the Group Header for the RECNO() band height to 10 inches (for portrait page layout), and the Detail Band height to 10 inches. These are accessed by double-clicking the separator bar for each band. Select the "Constant band height" check box for each band as well, then click OK to close the dialog box.
- To simulate a three-page "Detail Band," follow Step 9 above but also set the Group Footer band height for the RECNO() band to 10 inches as well and select the "Constant band height" check box, and then click OK to close the dialog box.
- Place some of the fields added when the Quick report was made at the top and bottom of each of the bands sized in Step 9 and optionally Step 10.
- Preview the report. Each of the 10-inch bands print on a different page, but since the group breaks on RECNO() the group header and footer will also print information from that detail record alone.
- It is not necessary to have the Group and Detail bands exactly 10 inches, but the sum of the height of each of these individual bands plus the Page Header and Page Footer heights should be around 10.5 inches.
- Having report fields that print memo data or are set to stretch can cause unexpected results with the above scenario.
Keywords: kbdesigner kbhowto KB168527