Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET PRINTER TO NAME (xxx) bug?
Message
From
22/06/1999 15:04:39
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
SET PRINTER TO NAME (xxx) bug?
Miscellaneous
Thread ID:
00232645
Message ID:
00232645
Views:
27
Hey, all...

I'm not able to get VFP to respect my SET PRINTER TO NAME (PrinterName). I think I've found out why, and it appears to be a bug, but I'd like to have your feedback.

Before running a report, we give the user the option of selecting a network printer other than his/her default Windows printer. It's very simple:

lcPrinterName = GETPRINTER()
SET PRINTER TO NAME (lcPrinterName)

This works fine, or so it appeared. Certain reports *always* go to the default Windows printer (SET("PRINTER", 2)) as opposed to the chosen VFP printer (SET("PRINTER", 3)). What these rogue reports have in common is they were all created off-site (and thus reference a printer not available to us here on the network).

Hacking the FRX, it appears that all FRXs retain the printer settings at the time they're created ("saving the report environment" has no apparent affect). If the printer referenced in the FRX does not exist at runtime, it does the same thing that it does at design time: defaults to the Windows default. Once you've registered your workstation's default printer in the FRX (by making a change and saving the FRX), it will then come up with the VFP default printer at design time, and allow you to choose any network printer at runtime.

To summarize: it appears that, at runtime, an FRX will revert to (and be sent to) the default Windows printer, and ignore the setting of SET("PRINTER", 3).

Obviously, this is a serious problem for selling applications into other networked environments, as we tell them they can choose a printer, but then don't print to it. Since we print both B/W reports and color graphs, our users *must* be able to swap between printers, preferably without having to go through the Windows Control Panel.

Has anybody else hit on this? Is this a known bug, a new one, or am I just missing something? Workarounds? Your thoughts are much appreciated...

Scott
Scott D. Grabo
Chief Information Officer
Occupational Health Group
First Advantage Corporation
Reply
Map
View

Click here to load this message in the networking platform