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

Last reviewed: April 17, 1995
Article ID: Q99906
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a

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:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 17, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.