A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Find out if report goes to a specific printer (re-post)



 
 
Thread Tools Display Modes
  #1  
Old November 23rd, 2005, 03:22 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Find out if report goes to a specific printer (re-post)

(I am reposting as my previous thread on this subject, started 18 November,
seems to have gone dead for a few days)

I have defined a number of reports that need to be printed on specific
printers (because they have particular stationery loaded). What I need to do
now is check that the user has that printer installed on their machine.

I have noticed that when I hover my mouse over a report name (Access 2002),
I get a tooltip telling me where this report will print. Is there any way I
can programatically retrieve this information? (Having got this, I can loop
through the Printers collection to see if it's installed or not).

From my previous posting of this question I have been down the PrtDevMode
route, and for various reasons I don't think this is going to do the trick
for me. I am willing to be proved wrong on this front, but please read the
earlier thread to see what I've already tried and what my outstanding
reservations are.

Any help will be greatly appreciated.

Jon.
  #2  
Old November 23rd, 2005, 03:48 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Find out if report goes to a specific printer (re-post)

Once you open the report, you can read:
Reports("Report1").Printer.DeviceName
Works in design view too.

In Access 2002 and 2003, you can set the Printer before opening the report.
It is therefore feasible to let the user assign a printer to use with each
of their reports, and have the database assign that printer before opening
the report. For a downloadable example, see:
Printer Selection Utility
at:
http://allenbrowne.com/AppPrintMgt.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jon Ley" wrote in message
...
(I am reposting as my previous thread on this subject, started 18
November,
seems to have gone dead for a few days)

I have defined a number of reports that need to be printed on specific
printers (because they have particular stationery loaded). What I need to
do
now is check that the user has that printer installed on their machine.

I have noticed that when I hover my mouse over a report name (Access
2002),
I get a tooltip telling me where this report will print. Is there any way
I
can programatically retrieve this information? (Having got this, I can
loop
through the Printers collection to see if it's installed or not).

From my previous posting of this question I have been down the PrtDevMode
route, and for various reasons I don't think this is going to do the trick
for me. I am willing to be proved wrong on this front, but please read the
earlier thread to see what I've already tried and what my outstanding
reservations are.

Any help will be greatly appreciated.

Jon.



  #3  
Old November 23rd, 2005, 04:51 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Find out if report goes to a specific printer (re-post)

Allen,

Sorry, this does not do what I need. If I open a report that has a specific
printer assigned, and that printer is not installed on this computer, a
dialog box pops up saying that "This document was previously formatted for
the printer XXX, but that printer isn't available. Do you want to use the
default printer YYY?"

If the I click OK and then examine Reports("Report1").Printer.DeviceName I
get back my default printer, not the printer I wanted to send the report to
originally.

Similarly, letting the user select a printer is not an option. I want to
define the printer myself and make sure the user has this printer installed
before I run the report. Just for info, so you are aware of why I am trying
to do this:

We use a PDF printer called "eDocPrinter PDF Pro". This driver allows us to
set up a number of different named printers, each with a different
configuration (standard PDF, append to an existing PDF, create PDF with a
watermark) and control the precise location and name of the resulting PDF
files. By use of registry settings, we can lock down these configurations so
that the users can't mess them up. If I design a report to use one of these
specific named PDF configurations, I want to check that the user has this
config installed on their machine before I try and open the report. I do have
a slightly clunky solution to this problem, but it involves sending a dummy
report to the printer first and then seeing if the expected PDF file is
created. However, if the relevant config is not installed then I get the
dialog box coming up, which I would prefer the user not to have to deal with.

It's really frustrating that this config name comes up on the tooltip when
you hover over the report name, even if the config is not installed. I just
want to get this back programatically.

Thanks anyway for your suggestion - any other ideas?

Jon.

"Allen Browne" wrote:

Once you open the report, you can read:
Reports("Report1").Printer.DeviceName
Works in design view too.

In Access 2002 and 2003, you can set the Printer before opening the report.
It is therefore feasible to let the user assign a printer to use with each
of their reports, and have the database assign that printer before opening
the report. For a downloadable example, see:
Printer Selection Utility
at:
http://allenbrowne.com/AppPrintMgt.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jon Ley" wrote in message
...
(I am reposting as my previous thread on this subject, started 18
November,
seems to have gone dead for a few days)

I have defined a number of reports that need to be printed on specific
printers (because they have particular stationery loaded). What I need to
do
now is check that the user has that printer installed on their machine.

I have noticed that when I hover my mouse over a report name (Access
2002),
I get a tooltip telling me where this report will print. Is there any way
I
can programatically retrieve this information? (Having got this, I can
loop
through the Printers collection to see if it's installed or not).

From my previous posting of this question I have been down the PrtDevMode
route, and for various reasons I don't think this is going to do the trick
for me. I am willing to be proved wrong on this front, but please read the
earlier thread to see what I've already tried and what my outstanding
reservations are.

Any help will be greatly appreciated.

Jon.




  #4  
Old November 23rd, 2005, 04:57 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Find out if report goes to a specific printer (re-post)

If you know the device name, could you not create a little function with
error handling, and refer to:
Application.Printers("eDocPrinter PDF Pro")

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jon Ley" wrote in message
...

Sorry, this does not do what I need. If I open a report that has a
specific
printer assigned, and that printer is not installed on this computer, a
dialog box pops up saying that "This document was previously formatted for
the printer XXX, but that printer isn't available. Do you want to use the
default printer YYY?"

If the I click OK and then examine Reports("Report1").Printer.DeviceName I
get back my default printer, not the printer I wanted to send the report
to
originally.

Similarly, letting the user select a printer is not an option. I want to
define the printer myself and make sure the user has this printer
installed
before I run the report. Just for info, so you are aware of why I am
trying
to do this:

We use a PDF printer called "eDocPrinter PDF Pro". This driver allows us
to
set up a number of different named printers, each with a different
configuration (standard PDF, append to an existing PDF, create PDF with a
watermark) and control the precise location and name of the resulting PDF
files. By use of registry settings, we can lock down these configurations
so
that the users can't mess them up. If I design a report to use one of
these
specific named PDF configurations, I want to check that the user has this
config installed on their machine before I try and open the report. I do
have
a slightly clunky solution to this problem, but it involves sending a
dummy
report to the printer first and then seeing if the expected PDF file is
created. However, if the relevant config is not installed then I get the
dialog box coming up, which I would prefer the user not to have to deal
with.

It's really frustrating that this config name comes up on the tooltip when
you hover over the report name, even if the config is not installed. I
just
want to get this back programatically.

Thanks anyway for your suggestion - any other ideas?

Jon.

"Allen Browne" wrote:

Once you open the report, you can read:
Reports("Report1").Printer.DeviceName
Works in design view too.

In Access 2002 and 2003, you can set the Printer before opening the
report.
It is therefore feasible to let the user assign a printer to use with
each
of their reports, and have the database assign that printer before
opening
the report. For a downloadable example, see:
Printer Selection Utility
at:
http://allenbrowne.com/AppPrintMgt.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jon Ley" wrote in message
...
(I am reposting as my previous thread on this subject, started 18
November,
seems to have gone dead for a few days)

I have defined a number of reports that need to be printed on specific
printers (because they have particular stationery loaded). What I need
to
do
now is check that the user has that printer installed on their machine.

I have noticed that when I hover my mouse over a report name (Access
2002),
I get a tooltip telling me where this report will print. Is there any
way
I
can programatically retrieve this information? (Having got this, I can
loop
through the Printers collection to see if it's installed or not).

From my previous posting of this question I have been down the
PrtDevMode
route, and for various reasons I don't think this is going to do the
trick
for me. I am willing to be proved wrong on this front, but please read
the
earlier thread to see what I've already tried and what my outstanding
reservations are.

Any help will be greatly appreciated.

Jon.



  #5  
Old November 23rd, 2005, 08:56 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Find out if report goes to a specific printer (re-post)

Thanks!!

Of course I can. I'm not sure why I didn't think of that. Possibly because I
had come at the problem from a different angle (find out first if the report
is set for a specific printer and then check if that printer is available).
This solution will sort out my immediate issue, as I know in advance what
printer I want to print to.

I don't need any more input on this thread, but ...

As an academic exercise though, I would still like to potentially
future-proof my app and provide a more generic function that I can call to
print any report, and have the function check first whether the report's
printer is available. This could then also be used in other instances, for
example where a report is going to a specific physical printer (because it
has particular stationery loaded), and that printer is replaced with a
different one. I would not need to hunt through my code for any places where
I am checking for this specific printer. Instead I could just set the report
to go to the new printer and the existing code would handle it automatically.

I suppose it's just bugging me that a small piece of information that is
obviously there (IT APPEARS IN THE TOOLTIP!!) is not easily accessible
through code.

Regards,

Jon.

"Allen Browne" wrote:

If you know the device name, could you not create a little function with
error handling, and refer to:
Application.Printers("eDocPrinter PDF Pro")

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


  #6  
Old November 24th, 2005, 01:12 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Find out if report goes to a specific printer (re-post)

It has to be one of the Properties of the report, but the report would have
to be open (a member of the Reports collection) in order to read the
property (unless you can get at it through the Containers!Reports
collection.)

PrtMip/PrtDevNames/PrtDevMode would also give you that Info.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jon Ley" wrote in message
...

Of course I can. I'm not sure why I didn't think of that. Possibly because
I
had come at the problem from a different angle (find out first if the
report
is set for a specific printer and then check if that printer is
available).
This solution will sort out my immediate issue, as I know in advance what
printer I want to print to.

I don't need any more input on this thread, but ...

As an academic exercise though, I would still like to potentially
future-proof my app and provide a more generic function that I can call to
print any report, and have the function check first whether the report's
printer is available. This could then also be used in other instances, for
example where a report is going to a specific physical printer (because it
has particular stationery loaded), and that printer is replaced with a
different one. I would not need to hunt through my code for any places
where
I am checking for this specific printer. Instead I could just set the
report
to go to the new printer and the existing code would handle it
automatically.

I suppose it's just bugging me that a small piece of information that is
obviously there (IT APPEARS IN THE TOOLTIP!!) is not easily accessible
through code.

Regards,

Jon.

"Allen Browne" wrote:

If you know the device name, could you not create a little function with
error handling, and refer to:
Application.Printers("eDocPrinter PDF Pro")



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
subreport not displaying in main report JohnLute Setting Up & Running Reports 15 November 17th, 2005 04:02 PM
Printing a report to a specific printer Wendy Clarkson Setting Up & Running Reports 3 August 11th, 2005 04:05 PM
Have Report Print to a Specific Printer Paper Tray in MDE Bill Hymel Setting Up & Running Reports 1 April 26th, 2005 02:14 PM
Select a specific printer for a report KCi General Discussion 2 April 11th, 2005 01:49 PM
Calendar Question Josh General Discussion 7 March 28th, 2005 11:19 PM


All times are GMT +1. The time now is 05:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.