OIPI Question (OpenInsight 32-Bit)
At 10 FEB 2003 02:53:26PM Gray Cunningham wrote:
Hi,
Does the Set_Printer("CURRENTDEVICE") in the OIPI return the currently selected printer or the Windows Default Printer?
I have a form that allows users to reprint customer invoices. I would like it to show the current printer to which the output will be sent and allow them to click a button to specify a different printer, using Utility("PRINTSETUP"). In my testing, I have found that no matter what printer gets selected in the Print Setup, it seems that the Windows Default Printer is returned by Set_Printer("CURRENTDEVICE"), however the output goes to the selected printer. Since I need to allow the user to preview the output prior to printing, I can't simply run INIT with the Print Setup option (1). I even tried displaying the Print Setup button on the Preview Window, which, as stated in the documentation, only affects the next printing session. Ironically, the current device returned by Set_Printer("CURRENTDEVICE") after a printer was chosen this way was the newly selected printer. Is there something simple that I am overlooking?
I am using OI 4.03 on Windows 98 SE and OIPI 4.01.
Thanks,
Gray Cunningham
At 11 FEB 2003 03:16AM Barry Stevens wrote:
]]Set_Printer("CURRENTDEVICE") «
Is this a typo - s/b
Currentdevice=Get_Printer("CURRENTDEVICE")
At 11 FEB 2003 03:27AM Barry Stevens wrote:
]]Utility("PRINTSETUP"). «
Use Set_Printer("INIT", "", "", "", "", 1) instead, followed by
CurrentDevice=get_printer("CURRENTDEVICE")
set_printer("TERM")
.
.
.
Then, when they decide to print the invoice to the printer you can do:
Set_Printer("INIT", RepName, title, PageInfo, "", PrintSetup,CURRENTDEVICE)
At 11 FEB 2003 10:03AM Gray Cunningham wrote:
oops…yep, it is a typo
At 11 FEB 2003 11:00AM Gray Cunningham wrote:
Barry,
Thanks so much…worked like a charm.
Gray
At 14 FEB 2003 02:43PM Gray Cunningham wrote:
One small issue with this solution has popped up…everytime a user selects a printer, a blank page is ejected on that printer. Do you know of any way to prevent this?