Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing
Message
From
24/05/1999 10:59:03
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00222026
Message ID:
00222057
Views:
19
>>>I'm trying to print some output, it will either go to the printer or to an ASCII file. I'm having problems with my current method, and I'm just wondering, what do you guys use for a print dialog, do you make up your own, or is there a base class or something that you prefer...just looking for some wisdom so I don't re-invent the wheel here;)
>>
>> What sort of problems ??
>
>Well...I've got a dialog box that comes up when someone hits the print button, it basically has 3 comboboxes: one to choose where to direct this little report to, Printer or Text file. The text file part works fine, but when they choose printer, I've got a second Combobox that is populated with Aprinters, I've used set("printer",3) to get the default printer, but they can choose another printer, if it's been installed in windows. All that works fine, it's when I try to get things directed to the printer when I have problems. Currently I'm using SET PRINTER TO NAME (var), in which var holds the printer chosen from the combobox. then REPORT FORM "form" TO PRINTER. The REPORT command will work if I don't try to use the SET PRINTER, however, when I try to SET PRINTER it will not print to the printer, in fact, it keeps trying to print to a file, the file being the name of the printer!! I'm basically ready to forget using my custom output box and looking to see if there's a generic or
>base class that will do this job for me.
> The whole purpose of this is to direct a report form either to the printer or to an ASCII file. Thanks for your replies:)


Instead of a second window, just enable a Printer Setup command button when they go to printer. In the Click event of the command button call SYS(1037).
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform