Microsoft KB Archive/99763

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a
 * Microsoft FoxPro for MS-DOS, versions 1.02, 2.0, 2.5, 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 &quot;Active:&quot;+STUFF(&quot;..........&quot;,RECN%10+1,1,'!') NOWAIT RETURN &quot;&quot; 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.</li></ol>

The next steps modify the report to call the UDFs:

<ol>  In the Command window, type:  <pre class="CODESAMP">     MODIFY REPORT </li> Press CTRL+F to create a new field somewhere within the detail band.</li>  In its expression box, type:  <pre class="CODESAMP">     SHO_STAT </li> If a summary band already exists in the report, skip to #6.</li> From the Report menu, choose Title/Summary, and create a summary band.</li> Add a new field to the summary band.</li>  In its expression box, type:  <pre class="CODESAMP">     NO_STAT </li> Press CTRL+W to save the report.</li></ol>

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 query words: FoxDos FoxWin report progress

Keywords         : Version          : Platform         : Issue type       :
 * }