How to Create a Data Grouping on Every Nth Record
ID: Q109152
2.50 2.50a 2.50b 2.60 2.60a | 2.50 2.50a 2.50b 2.60 2.60a |2.50b 2.60 2.60a
WINDOWS | MS-DOS | MACINTOSH
kbprg
The information in this article applies to:
- Microsoft Visual FoxPro for Windows, version 3.0
- Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6, and 2.6a
- Microsoft FoxPro for MS-DOS, versions 2.5, 2.5a, 2.5b, 2.6, and 2.6a
- Microsoft FoxPro for Macintosh, version 2.5b, 2.6, and 2.6a
In the FoxPro Report Writer, you can create a data grouping that will break
after a certain number of records.
For example, the following procedure will create a data grouping that
breaks after every fifth record.
1. Create a quick report based on the CUSTOMER database in the TUTORIAL
subdirectory.
2. From the Report menu, choose Variables.
3. Choose Add to add a variable.
4. For the variable name, type "cntr" (without the quotation marks).
5. For the value to store, type "Customer.state" (without the quotation
marks).
6. Select the Count radio button in the Calculate box and choose OK
twice to return to the report.
7. From the Report menu, choose Data Grouping.
8. Choose Add to add a Data Grouping.
9. Enter the following expression to group on:
INT(cntr/5)
10. Select OK twice to return to the report. You can now place fields and
text in the group header and footer, which will print every fifth
record.
Additional reference words: VFoxWin 3.00 FoxMac FoxDos FoxWin 2.50 RWriter
KBCategory: kbprg
KBSubcategory: FxtoolRwriter
Keywords : FxtoolRwriter
Version : 2.50 2.50a 2.50b 2.60 2.60a | 2.
Platform : MACINTOSH MS-DOS WINDOWS