We help IT Professionals succeed at work.

Changing printers in reports at run time

ChrisBerry
ChrisBerry asked
on
507 Views
Last Modified: 2008-02-01
Is it possible to change printer drivers on a specific report at run time?

I need to be able to write an Operator friendly interface to change the printer for a number of reports during the setup of a program.

I am using Access 97.

Any ideas?

Chris
Comment
Watch Question

Author

Commented:
Edited text of question

Commented:
Maby this is not what you where looking for but ...
If it is one report and you want to change the printer for it just open the report in preview use ctrl+P and choose from any printer in the network.

The user must choose printer anyway so why not use the built in windows "standards" instead of using tricky API calls that are bound to end up in errors (depending on the users windows configuration)..
perove

Author

Commented:
Sorry,

I do need to be able to setup the printers for the reports.

The application is to be installed at a number of sites that may have different reports. The majority will use the Default printer but other reports need to be setup for specific printers e.g. most will use the default printer, as LaserJet, but other need to use a dot matrix and others a fax.

Chris

Author

Commented:
Further to the above:-

I wish to use this in the setup of the application. The user of the software does not need to select the printer after that.

Chris

You might want to have a look at prtdevmode and prtdevnames in help.....then again, you might not. It's a nightmare

Author

Commented:
I have, it is and that was why I was trying to find out if someone either knew of a easier way or could explain prtdevmode and prtdevnames. Maybe even some routines or wrappers that would take care of it.

Cheers

Chris

Commented:
There is a 3'rd part software for this purpose. Check out :
 ATTAC Consulting Group. Internet: 75323.2112@compuserve.com
The "On the Fly Printing" code module provides the following functionality in printing Access reports:
.cut..cut

1.) Allows a user to select to print an Access report to any printer on the system, including fax and network printers through the standard print dialog, which can be called from a command button on a form, without having to compile the report before printing.
2.) The ability to spool multiple reports to a selected printer, despite different paper sizes, paper bins, and orientation.
3.) The ability to specify a filter for the report, when it is sent to print.
4.) For developers, "On the Fly Printing" can now be used with secure reports where the user does not have design permissions.  (See Using/Calling the Functions for more details.)
 How to get it:
cut..cut..
 by contacting us by either e-mail (75323.2112 @compuserve.com) or regular slow mail.

Prices etc..I don't know
perove

CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
I guess I asked for that. Not quite the type of "wrapper" i was thinking about, slightly tighter would have been better, but I will live with it.

Thanks

Chris

I have to distribute my databases in an .mde.  Is there a way to simply change the paper size or orientation without going into design mode?  It is ridiculous that the reports lose their settings when you move the file, but some sort of work around in .mde runtime would be extremely helpful if anyone knows...
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.