Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dot matrix printer driver problem with Win98 and Win2K.
Message
De
09/01/2004 11:15:54
 
 
À
08/01/2004 20:31:21
Mike Zhu
Icube Info International
Fremont, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00865301
Message ID:
00865463
Vues:
14
>I have a report that must print to dot matrix printer. If I save the report on a Win98 Computer, then Win2000 cannot print. It go to the default laser printer. If I save the report under Win2000, then Win98 cannot print to the dot matrix printer, it also print to the laser printer. Any ideas?

Try this (but backup all of you FRX / FRT files first):
* RPT_PATCH2.PRG

* Written by Kevin Emmrich, #019174.
* Modified by Terry Harris, #011927.

* This PRG opens the FRX files then removes just the 
*      TAGs and DEVICE, OUTPUT, DRIVER lines.

DEACTIVATE WINDOW "Project Manager - Your Project Name"

ON ERROR

SET MEMOWIDTH TO 240

lcreportdir = GETDIR()
IF NOT EMPTY(lcreportdir)
   ** Note, the ADDBS() does not exist in VFP 5, but does exist in VFP 7.
   ** ADDBS() adds a backslash (if needed) to a path expression.
   ** The VFP 5 output of GETDIR() looks like: "C:\NTAS\FORMS\".
   **  So, if running VFP 5, commented ou  the ADDBS() line.
   lcreportdir = ADDBS(lcreportdir)  
   * Store the number of "FRX" files to be processed into MVAR "lnreports".
   * "lafrxfiles" is an array that has the name of each "FRX" file.
   lnreports = ADIR(lafrxfiles,lcreportdir+"*.frx") 

   * Give the Operator some visual feedback.
   CLEAR
   ? "Number of Reports: ", lnreports
   ? " "
   WAIT

   FOR nfrxcounter = 1 TO lnreports
      WAIT WINDOW NOWAIT "Report Number " + TRANSFORM(nfrxcounter, "@R")
      * Put the PATH and the FRX name into 
      lcreportfile = lcreportdir+lafrxfiles(nfrxcounter,1)
      USE (lcreportfile) IN 0 ALIAS frxreport
      SELECT frxreport
      LOCATE FOR objtype = 1 AND objcode = 53
      IF FOUND()
         *** Overview: find mline for DEVICE, OUTPUT, DRIVER 
         *             and delete these lines.
         * Find out how many lines are in the entire MEMO field. 
         memolines = MEMLINES(EXPR)
         * Store the MEMO line number for each of these lines into MVARS.
         ndeviceline = ATCLINE("DEVICE=",EXPR)
         noutputline = ATCLINE("OUTPUT=",EXPR)
         ndriverline = ATCLINE("DRIVER=",EXPR)
         newexpr = ""
         FOR i = 1 TO memolines
            * Store all of the MEMO lines into "newexpr" except for 
            *       DEVICE, OUTPUT, & DRIVER.
            IF i <> ndeviceline AND i <> noutputline AND i <> ndriverline
               newexpr = newexpr + MLINE(EXPR,i) + CHR(13) + + CHR(10)
            ENDIF
         ENDFOR   && end of  FOR i = 1 TO memolines 
         REPLACE EXPR WITH newexpr
         REPLACE TAG WITH ""
         REPLACE tag2 WITH ""
      ENDIF   (FOUND())
      USE IN frxreport
   ENDFOR   && end of  FOR nfrxcounter = 1 TO lnreports
ENDIF   && end of   IF NOT EMPTY(lcreportdir)

WAIT CLEAR
WAIT WINDOW "Finished Processing Report (FRX) files..."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform