Prev: DataBrowser Refresh without changing the visible Row-Nr
Next: PKL SCC Manager Update available (1.5.1) !
From: Vaishali Kedar on 21 Jul 2010 02:24 Hi, I am using 27b and teh VO report editor. I need to print to one of two printers on the network. The report:print(oDevice) function asks for a device. Can someone please tell me how to use the oDevice object? Thanks, Vaishali
From: richard.townsendrose on 22 Jul 2010 02:55 Vaishali I have in the shell window an export as follows: EXPORT PrinterObject AS OBJECT // for ReportPro and in the shell window init SELF:PrinterObject := PtrDevice{SELF, SELF} I also use SysObject(SELF) // CAL 051001 so i can get the printer object ... anywhere. but the code below should work as well ... > > LOCAL oPtrDevice AS PtrDevice > > oPtrDevice:=PtrDevice{oOwner,oOwner} or use oPtrDevice:=SysObject():PrinterObject LOCAL cPrinter as STRING seems to be needed > > cPrinter:=oPtrDevice:PrinterName > > oPtrDevice:DefaultPaperSource == DMBIN_AUTO > > oReport:PrinterDevice:SetPrinterByName(cPrinter) regards richard
From: Stephen Quinn on 22 Jul 2010 23:06 Vaishali > **The PrintingDevice class works to the extent that it will give me > details of the default printer when used as PrintingDevice{}. > Else, it asks to pass {uName} - what does it expect from me and does > that enable me to send output to a printer other than the default printer > (which is really the main object of this whole exercise). You need to use the Registry to find out what other printers (ie names) are defined on the machine in question and then pass the name of the required printer to the PrintingDevice{} and then pass that printer object into the Report object for it to use. You cannot just pass any name into the printer object - it has to be one that's installed on that machine. IIRC you said your using the VO Report class, if so I don't know (never used it) if you can do this with that class. IIRC PrintingDevice{} or PtrDevice{} is part of Report Pro. CYA Steve
From: Geoff Schaller on 23 Jul 2010 19:38
Steve, You definitely would not use the registry. Too hard. Windows has nice APIs for this kind of thing. Geoff "Stephen Quinn" <stevejqNO(a)bigpondSPAM.net.au> wrote in message news:KE72o.1503$Yv.1307(a)viwinnwfe01.internal.bigpond.com: > Vaishali > > > > **The PrintingDevice class works to the extent that it will give me > > details of the default printer when used as PrintingDevice{}. > > Else, it asks to pass {uName} - what does it expect from me and does > > that enable me to send output to a printer other than the default printer > > (which is really the main object of this whole exercise). > > > You need to use the Registry to find out what other printers (ie names) are > defined on the machine in question and then pass the name of the required > printer to the PrintingDevice{} and then pass that printer object into the > Report object for it to use. > > You cannot just pass any name into the printer object - it has to be one > that's installed on that machine. > > IIRC you said your using the VO Report class, if so I don't know (never used > it) if you can do this with that class. > > IIRC PrintingDevice{} or PtrDevice{} is part of Report Pro. > > CYA > Steve |