How to Show Action with STATUS OFF & NOCONSOLE Print

ID: Q99763

The information in this article applies to:

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.

7. Add a new field to the summary band.

8. In its expression box, type:

      NO_STAT()

9. 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

Last Reviewed: June 27, 1995