TIP: Click on subject to list as thread! ANSI
echo: foxpro
to: DAVID POWELL
from: DEN BARNES
date: 1997-01-01 19:50:00
subject: ENHANCE REPORT WRITER

Hi David,
DP> Then, to be able to print a range of pages as well as the
    entire report is essential.
  In that context I am just willing to bet that You shall put this
to good use:
"The following general purpose user-defined function (UDF)
graphically reflects the progress of Reports.
Sample Code
-----------
   SET TALK OFF
   SET CURSOR OFF
   USE C:\FOXPRO2\TUTORIAL\CUSTOMER
   =DISPLAY_BORDER()
    
   * The following command uses the thermometer bar with
   * the DISPLAY_BAR and DISPLAY_BORDER commands.
   * The DISPLAY_BAR function displays a bar graph to represent the
   * progress of a report being printed. In the Report Writer, when an
   * index is active, create a memory variable called REC_NUMBER. 
   * Choose VARIABLES from the REPORT menu. Then choose ADD. Choose 
   * the Count option button. Then create a variable name of 
   * REC_NUMBER and store the value 0. When no index is active, 
   * replace the memory variable REC_NUMBER is the DISPLAY_BAR 
   * function with RECNO(). Then issue the following command:
   REPORT FORM CUST NOCONSOLE TO PRINTER FOR DISPLAY_BAR()=.T.
   * The following function displays a bar graph to represent
   * the progress of a Sequential operation, a Report, or indexing.
   FUNCTION DISPLAY_BAR
   PCT = REC_NUMBER * 100 / RECCOUNT()
   @ 18,14 SAY REPLICATE(CHR(219),(PCT/2)+1)
   RETURN .T.
   * The following function displays the
   * background screen for the bar graph function.
   FUNCTION DISPLAY_BORDER
   @ 14,10 TO 19,69 DOUBLE
   @ 17,11 TO 17,68 DOUBLE
   @ 17,10 SAY CHR(204)
   @ 17,69 SAY CHR(185)
   @ 15,24 SAY "P E R C E N T   C O M P L E T E"
   @ 16,14 SAY "0   10   20   30   40   50"
   @ 16,44 SAY "60  70   80   90   100"
   RETURN .T.
Dr. David Fulton"
--- TMail v1.31.5
---------------
* Origin: Diablo Valley PCUG-BBS, Walnut Creek, CA 510/943-6238 (1:161/55)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.