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:
- In the Command window, type
MODIFY COMMAND sho_stat && UDF names must not exceed 8 characters
- 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.
- Press CTRL+W to save the .PRG file.
- In the Command window, type:
MODIFY COMMAND no_stat
- Within NO_STAT.PRG, type:
WAIT CLEAR
- Press CTRL+W to save this .PRG file.
The next steps modify the report to call the UDFs:
- In the Command window, type:
MODIFY REPORT <reportname>
- Press CTRL+F to create a new field somewhere within the detail
band.
- In its expression box, type:
SHO_STAT()
- If a summary band already exists in the report, skip to #6.
- From the Report menu, choose Title/Summary, and create a summary
band.
- Add a new field to the summary band.
- In its expression box, type:
NO_STAT()
- 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.
|