How to Show Action with STATUS OFF & NOCONSOLE Print

Last reviewed: June 27, 1995
Article ID: Q99763
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a
  • Microsoft FoxPro for MS-DOS, versions 1.02 2.0, 2.5, and 2.5a

SUMMARY

While lengthy reports are being output to the printer or a file with the NOCONSOLE option and STATUS [BAR] OFF, the computer may appear to be hung, as no programmatic indication can be directed to the screen. However, the computer isn't hung. You can indicate that the computer is still working by using the technique described below, which involves using the WAIT WINDOW command along with two very small user-defined functions (UDFs) in the report.

MORE INFORMATION

To produce this effect, you must first create two very small programs, then you must add two fields (and possibly a summary band) to each report in which you want this feature.

Do the following to create the UDF programs:

  1. In the Command window, type

          MODIFY COMMAND sho_stat  && UDF names must not exceed 8 characters
    

  2. Within the newly created SHO_STAT.PRG, type the following:

          WAIT WINDOW "Active:"+STUFF("..........",RECN()%10+1,1,'!') NOWAIT
          RETURN ""
    

            NOTE: Don't put spaces between the quotation marks on the last
            line.
    
    

  3. Press CTRL+W to save the .PRG file.

  4. In the Command window, type:

          MODIFY COMMAND no_stat
    

  5. Within NO_STAT.PRG, type:

          WAIT CLEAR
    

  6. Press CTRL+W to save this .PRG file.

The next steps modify the report to call the UDFs:

  1. In the Command window, type:

          MODIFY REPORT <reportname>
    

  2. Press CTRL+F to create a new field somewhere within the detail band.

  3. In its expression box, type:

          SHO_STAT()
    

  4. If a summary band already exists in the report, skip to #6.

  5. From the Report menu, choose Title/Summary, and create a summary band.

  6. Add a new field to the summary band.

  7. In its expression box, type:

          NO_STAT()
    

  8. Press CTRL+W to save the report.

When the report is run, SHO_STAT() is called to update the WAIT WINDOW display as each database record is processed. When the report has completed, NO_STAT() is called to automatically remove the WAIT WINDOW from the screen.


Additional reference words: FoxDos FoxWin 2.50 2.50a report progress
KBCategory: kbprg
KBSubcategory: FxprgGeneral


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: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.