application.getPrinters()

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

application.getPrinters()

Postby mo_ca_mo » Thu Mar 03, 2011 8:47 pm

Hello,
I am using this function: "application.getPrinters()" to get the list of printer availables, so the user can choose the printer to send the reports.
We have a problem that is not of Servoy, it is more an S.O. or printer issue.
Anyway i share it here, maybe somebody else had the same problem:
The solution have to run in several pc and of course the S.O. will be differents
The names that the S.O. takes for the same destination are differents because of capitals letters: one read "\\PC_ONE\Zebra LP2844", other read "\\pc_one\Zebra LP2844". If one p.c. choose the printer destination for one report, the other p.c. cant find this printer because the names were read on a different way for the S.O.
Also we have seen that the name destination is read in a different way from the same pc for two differents printers, so the name not only depends on the S.O. , it depends too on the printer or the kind of port is using the printer. Ej. "\\pc_one\Lexmark Optra E310 PS" for paralel port and "\\PC_ONE\Zebra LP2844" for USB port, both names read from the same pc.
Anyone else had this problem?
Any idea to solve it?
Thanks in advantage.
mo_ca_mo
 
Posts: 72
Joined: Wed Feb 03, 2010 8:13 pm

Re: application.getPrinters()

Postby lwjwillemsen » Thu Mar 03, 2011 10:04 pm

Hi,

We solved this problem through our own idea : the application printers.

Create a table with 3 columns :
- application printer name
- system printer name
- print group reference

You should define your own application printer names.
Each user / session belongs to a certain printer group (room / area oriented). Take care of that at start up solution.
At a report we can choose as default output printer also for the application printer (name).
We decided to let each application printer name always start with an $ so we know at print time whether we are dealing with an application printer or a system printer.
In the case of an application printer name we look up with regards to the current print group the corresponding / right system printer name and voila...

PS. We already followed this approach in our foxpro programs.

Regards,
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands


Return to How To

Who is online

Users browsing this forum: No registered users and 12 guests

cron