Skipping Lines in an MS-DOS Report After x Detail Lines

ID: Q99906

The information in this article applies to:

SUMMARY

Using the procedure described below, you can build a report to skip one or more lines after a specific number of detail lines in FoxPro versions 2.0 and later for MS-DOS.

MORE INFORMATION

To create a report to skip one line every five detail lines:

 1. Create a quick report or open an existing report.

 2. From the Report menu, choose Variables.

 3. Choose the Add button and enter the following information in the
    Report Variables dialog box:

       Variable Name: REC
       Value to Store: any database field
       Initial Value: 0
       Reset: End of Report or End of page
       Calculate: Count

 4. Choose OK twice.

 5. Move the cursor to a blank space on the detail band.

 6. From the Report menu, choose Add Line.

 7. Move all fields in the detail band up one line.

 8. Move the cursor to the last line of the detail band.

 9. From the Report menu, choose Field.

10. Choose the Expression button, and type the following in the Report
    Expression dialog box:

       IIF(MOD(REC,5)=0,CHR(255),"")

      NOTE: To change the number of detail lines to print, change the
      number 5 to the number of lines to print in the previous
      command.

11. Choose the Verify button to confirm that the expression is valid.

12. Choose OK twice.

13. From the Report menu, choose Page Layout.

14. Choose the Options button.

15. Select the Suppress Blank Lines check box.

16. Choose OK twice.

17. To add more than one blank line, repeat steps 5-8. Select the

    field created in steps 9-12. From the Edit menu, choose  Copy,
    then from the Edit menu, choose Paste. Move the new field to the
    last line of the detail band.

Additional reference words: FoxDos 2.00 2.50 2.50a KBCategory: kbprg KBSubcategory:

Last Reviewed: April 17, 1995