Full Version: Maintain Specific Printer On Report
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
expatriate
Hi,

I'm working on revisions to a production database. There are many reports and each one is set up for a specific printer - about a dozen different printers at the site. I need to upgrade the db from 2000 to 2010. When I upgrade or import the schema to a new db I lose the destination printer for the report. Is there a way for me to keep the report formatted for the client in-house printer?

Thanks,

Peter
pere_de_chipstick
Hi Peter

Setting reports to use a specific printer has always caused me problems in the past, better to set all your reports to use the default printer and direct each report to the required printer.

In this post in the UA archive I have posted a demo that allows the user of each front end to select and direct reports to a specific printer available on that users PC.

hth
expatriate
QUOTE (pere_de_chipstick @ Apr 26 2012, 06:17 PM) *
Hi Peter

Setting reports to use a specific printer has always caused me problems in the past, better to set all your reports to use the default printer and direct each report to the required printer.

In this post in the UA archive I have posted a demo that allows the user of each front end to select and direct reports to a specific printer available on that users PC.

hth


Hi,

I'll look at the code, but one question. Does the user have to configure the report every time, or is the last setting stored as the default?

Thanks,

Peter
pere_de_chipstick
Hi Peter

The printer settings are set up once, they then do not need to be changed unless, say, a new printer is installed, a printer is removed (uninstalled), or the front end db is moved to another PC.

It could be considered as part of the setup routine when installing the database on each user's PC.

hth
expatriate
QUOTE (pere_de_chipstick @ Apr 26 2012, 06:35 PM) *
Hi Peter

The printer settings are set up once, they then do not need to be changed unless, say, a new printer is installed, a printer is removed (uninstalled), or the front end db is moved to another PC.

It could be considered as part of the setup routine when installing the database on each user's PC.

hth


Sounds great, Bernie. I'll have a look soon. Thanks.
pere_de_chipstick
Hi Peter


QUOTE
(from the code Archive)
For continuity's sake I'll ask this here. I'm not clear where/when this setup form is called. Would it be behind the command button that prints the report?

I'll answer this here as the code archive is not really the place for technical discussion.

In my dbs I have a command on the ribbon (or a menu bar for A2003) that will open up the printer defaults set up form.

When the db is first installed then the user (or an administrator) can set up which printer s/he wants each report type to go to - you can have as many different report types as there are reports if you so wish, but normally I have 2 'standard' report types (A4 Landscape and A4 Portrait) to which "all" standard reports are sent to. Additionally there will be report types for reports that go to e.g. a thermal printer, or a bar code printer etc You also may have report types that you want sent to other specific printers or with specific formats. But once set up the PrinterSelectPrinter function will interrogate the 'tblPrntDflts' table and will set up the report with all the defaults defined on the setup table for that report type.

So you would print or preview a report completely independently of the setup.
However To print or preview a report; instead of (e.g.)
DoCmd.OpenReport "ReportName", acViewPreview, , stLinkcriteria, acNormal, strArgs
You would replace this with:
PrintSelectPrinter "ReportName", acViewPreview, stLinkcriteria, [ReportType], strArgs

Where [ReportType] is the ID of the record in table 'tblPrntDflts' which is the report type to be used for the selected report.

Hope that helps

Edit:
Where you have 6 printers then you would need at least 6 report types set up in the database, if some are these are both landscape and portrait you will need an additional report type for each printer that uses both landscape and portrait formats.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.