Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default Printer hardcoded in report
Message
From
08/07/1999 13:56:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Default Printer hardcoded in report
Miscellaneous
Thread ID:
00239000
Message ID:
00239000
Views:
60
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
Next
Reply
Map
View

Click here to load this message in the networking platform