Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default Printer hardcoded in report
Message
De
08/07/1999 13:56:07
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Default Printer hardcoded in report
Divers
Thread ID:
00239000
Message ID:
00239000
Vues:
64
Whenever I use File / Page Setup / Print Setup in the VFP Report Designer to set page settings -- such as Landscape -- in a report, my default printer gets stored as the default for the report, overriding the user's default printer. I created the program below to clear the printer from the report file as recommended by the Microsoft KB, however, I lose the Landscape setting in the process. How can I prevent the printer from being stored in the first place or flexibly "scrub" only the default printer setting from my report file? Any insight would be greatly appreciated. Thanks, Scott

* Remove specific printer settings from given report file so report will print
* to the user's default Windows printer. See Microsoft KB Article #Q138396 for
* more information about this.
PARAMETERS cReportFile

IF TYPE("cReportFile") <> "C"
MESSAGEBOX('No report name supplied.' + CHR(13) + 'Command format:' + CHR(13) + CHR(13) + ' DO DEFPRINT WITH "myreport"')
ELSE
cFile = IIF(ATC(".frx",cReportFile)==0,ALLTRIM(cReportFile)+'.frx',cReportFile)
IF FILE(cFile)
USE (cFile)
LOCATE FOR ObjType == 1 AND ObjCode == 53
IF FOUND()
REPLACE Tag WITH ""
REPLACE Tag2 WITH ""
REPLACE Expr WITH ""
ELSE
MESSAGEBOX("Printer settings record not found.")
ENDIF
USE
MESSAGEBOX("Report <"+cFile+"> updated.")
ELSE
MESSAGEBOX("Report <"+cFile+"> does not exist.")
ENDIF
ENDIF
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform