|
Home > Archive > dBASE Questions and Answers > July 2005 > How to... Set Default Printer
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to... Set Default Printer
|
|
| John Fried 2005-07-05, 8:24 pm |
| I have a big dB2K app running on a Terminal Services network (that I don't
maintain). Since they are running the app on the T/S server, the server's
default printer is everyone's default. Therefore each user must repeatedly
select their own printer for each and every report. I have been asked if I
could somehow define and then set the default printer for each user. OLH
for choosePrinter() says:
_app.printer.choosePrinter() // sets the default printer
report.printer.choosePrinter() //sets the printer for that instance of the
report
When I run _app.printer.choosePrinter() from a menu selection, it sets and
remembers the Specific Printer setting but doesn't use that setting when
printing a report. Instead, it always reverts to the Default Printer -- not
the one set with _app.printer.choosePrinter().
If I set r.printer.printerName := _app.printer.printerName then it will use
the new default setting. Is this step really necessary? Isn't there some
way to globally set the default printer without having to modify every
report?
Thanks,
John
| |
| Dan Barbaria 2005-07-05, 8:24 pm |
|
"John Fried" <john@dataknight.com> wrote in message
news:42CAEB25.33D00F82@dataknight.com...
>I have a big dB2K app running on a Terminal Services network (that I don't
> maintain). Since they are running the app on the T/S server, the server's
> default printer is everyone's default. Therefore each user must repeatedly
> select their own printer for each and every report. I have been asked if I
> could somehow define and then set the default printer for each user.
Could you use a local .ini file to store the printer info an have the report
look for that at run time?
Dan Barbaria
| |
| John Fried 2005-07-06, 9:23 am |
| Dan Barbaria wrote:
>
> Could you use a local .ini file to store the printer info an have the report
> look for that at run time?
Unfortunately, that won't work. Each time a user logs into T/S they get a
new session number and that number is included in the printer description.
I may have a solution, though. In the Preview.wfm's PushPrint_onClick
event, I've added two lines to load & save the last used printer name:
....
r.printer.printerName := _app.printer.printerName // load last name
if r.printer.choosePrinter()
_app.printer.printerName := r.printer.printerName // save name
....
Initial reports from the client are promising. Time will tell...
John
|
|
|
|
|