Link to home
Start Free TrialLog in
Avatar of ChrisBerry
ChrisBerryFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Changing printers in reports at run time

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
Avatar of ChrisBerry
ChrisBerry
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Edited text of question
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
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

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

Avatar of Helicopter
Helicopter

You might want to have a look at prtdevmode and prtdevnames in help.....then again, you might not. It's a nightmare
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

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

ASKER CERTIFIED SOLUTION
Avatar of tuvi
tuvi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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...