473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Why printer properties change in Access reports when appl is run from different pc?

Can anybody solve this problem?

ENVIRONMENT:
Application is built in MS Access 2007. Data are stored on SQL Server while users run compiled Access projects. User PCs run Windows XP and Windows 7 utilizing Access Runtime (no access installed on client PCs). Some reports use specific paper sizes and are printed from designated printers through printer server.

PROBLEM:
On developer's PC reports see non default printers properly and application works fine. When the application is compiled and copied onto users PCs the same reports do not use designated printers and if they do see them then the paper sizes are incorrect, as if chosen randomly. It looks to me that the report design itself stores not the names of the printers (nor the names of the paper sizes) but instead their codes as recorded on developer's PC. It means that all PCs, even if have the same printers installed from the access application are seen as completely different codes.

Is there any cure to this obnoxious problem?

Thank you.
Oct 24 '11 #1
10 4530
NeoPa
32,556 Expert Mod 16PB
I think this is about the printers available on the various PCs. If the same printer isn't available on a destination PC as the report was designed for then it tries to approximate and has difficulties.
Oct 24 '11 #2
The same printers are set up on all PCs, including the same names and pointing to the same printer server.
Oct 24 '11 #3
Maybe I should add that when the application is compiled on the Windows XP machine and report uses networked printer all seem to work fine.

HOWEVER: When application is compiled on Windows XP machine and printing is done as "direct" to IP address of the printer it is again all messed up!

Very weird.
Oct 24 '11 #4
NeoPa
32,556 Expert Mod 16PB
Why is that weird? Surely that is the behaviour you'd expect.

It's hardly likely to recognise printers as the same if you only refer to them via IP address. Just another reason not to use that approach (which isn't a very clever approach anyway I would have thought). Network based printer servers are not just for decoration ;-)
Oct 24 '11 #5
Maybe I did not express myself properly. Imagine you install a printer on one PC using direct IP access, which is static. You set up its properties including default page size, default feeder type etc. Next, you install the same printer on another PC using exactly the same name and properties. How come is that approach HARDLY likely to recognize those printers by application? Why should I expect different behavior? Am I missing something? Both PCs see exactly the same printer with exactly the same settings, so how come Access Report messes it up? Maybe it was not the best approach but to me it seemed to be quite logical.

Nevertheless, I had to abandon this aproach and move to everybody's favorite network printer because it solved this weird, i repeat weird problem. So, for some time, when our network was purely Win XP all worked fine. Now, with Windows 7 as my developer's machine I face the same problem anew, even though printing is done through holy server. So, is there a solution to that or not? How can you explain the situation that when I open the report on my machine it works fine but when the same report is opened on another it is all messed up? Is this really a behavior I should expect? How can I ensure that report design in MS Access remembers exactly what printer and on what kind of page should it print? Only if I install the full Access on user's machine and re-compile the application on that computer it works fine. But only on that machine.
Oct 24 '11 #6
NeoPa
32,556 Expert Mod 16PB
jkostrzewski:
How come is that approach HARDLY likely to recognize those printers by application?
Because each printer set up on each machine is different from all the rest. Instead of using a unified consistent reference you're using separate references to similar printers (It neither knows nor cares that each printer is actually the same physical device).

I suppose what is expected by one person with one set of experience is not necessarily obvious to another person with different experience. It's hard for me to tell what is standard, as I only really know my own experience. I wouldn't have been surprised by what you describe in those circumstances, but I possibly have a different background in Windows and networks from you. I was a network administrator for many years.

What you need to understand though, is that printers set up separately to print to IP ports are still, internally, local printers on that machine. Network printers, on the other hand, those provided by a network server, can be understood as pointing to the same printer, which is essentially a logical printer provided by the printer server. It may help to understand if you try pausing a printer set up to print to an IP port. If you pause it on PC A then PC B is not paused. It has a separate printer and local queue. An administrator can properly manage a networked printer though. Pausing the queue from PC A, because it is a central queue, also effects PC B.
Oct 24 '11 #7
Thank you for your explanation about printers. I do understand it but that is not the problem of my original post. It is not about administering printers or nuances between IP printing and server printing. It is about how to set up an Access Report's printer properties so that they stay the same on each PC.

As I said at the beginning the applications we use print those specialized reports through printer server. When application is compiled on Windows XP then all PCs print properly, i.e. to the correct printer and with correct paper size. However, when I compile the application on Windows 7 then the paper size is different on different machines. Depending on the machine, user can see the preview with different page layout and correct it but on another PC the Access just gives an error that print job was cancelled and nothing can be done. I suspect that in that second case application still sees that same networked printer but for some reason the paper size is chosen incorrectly and that prompts Access to cancel it.

This has nothing to do with IP printing now. Historically we used IP printing before and everything worked fine until we started using those different special kind of papers, so some reports had to be set up to print to non-default printers. At that point it all got messed up and only solution I could figure out was to use print server. All went well for some time but once I upgraded my PC to Win 7 and compiled applications on it, the problem appeared again. To be precise, I think now that what is messed up is not the printer but rather paper size and feeder type. Those are properties which you set up in Access report when designing it to print to specialized printer. Printer itself has those same properties set up as default so all seem to be OK, however after compiling the application and copying it to another PC the report in question messes up those properties.

So, how can I ensure that my applications print consistently regardless of the PC they are run on? Maybe instead of using standard MS Access report design and VBA underneath I should dig into OS APIs to work out those printers? How other Access developers handle this kind of printing?
Oct 25 '11 #8
NeoPa
32,556 Expert Mod 16PB
I'm afraid I am near the limit of my understanding of printers here and how they work in Access Reports. Let me explain what I can at least, but it may not be enough to resolve your problem.
  1. Access reports are designed with a specific printer. They are always dependent on properties of the printer they were designed to print to.
  2. From what you say I would infer that how printer devices (in the OS, and by extension in Access) are maintained in Win 7 is different from how they are in Win XP. This is very probably at the heart of your problem.
  3. Page sizes etc are properties of the stationery, but the stationery is a property of the printer. I don't believe you can rely on stationery on one printer necessarily mirroring that same stationery on another. Other settings such as printable border edges are certainly dependent on the specific printer of course.
  4. Some better news is that I know most, if not all (I suspect all), of the properties for a printer are available via the VBA class structure (IE. No need to venture into OS calls). I have some experience of that but from a long while back and I have no notes available now.

I know printers in reports can be very strange, and it can be hard to realise why it has to be so complicated (I don't know enough to know exactly why it should be so, but enough to realise it could never be as straightforward as most people seem to expect), but it's not an area I do much with I'm afraid. Most of my reporting was to standard network printers and I'd set the whole network up for maximum compatibility anyway (It seems Windows OSes were more compatible up to Win XP than they have been since). As time went by though, I found most of my newer reporting was via export into Excel.
Oct 25 '11 #9
Thank you for your insights.

For so many years of my experience with IT I was always wondering why such basic device as printer has to have so many problems. If you look through the history of IT there always were problems with printers, at least on the application level.

It looks to me that when you install a printer on a client machine all its properties are enumerated and stored in registry along user friendly names. Name of the printer as well as other properties have codes through which they are recognized by the OS. Each machine can have completely different codes, so when Access Report is being opened it refers to the codes instead of the names and hence the mess-up. I guess that I will have to go to the level of those codes and hopefully as you suggested in p.4 use VBA class structure to access them.
Oct 26 '11 #10
NeoPa
32,556 Expert Mod 16PB
jkostrzewski:
For so many years of my experience with IT I was always wondering why such basic device as printer has to have so many problems.
You want to try configuring them! Nothing was ever as straightforward as I was expecting.

I regret that I wasn't able to provide more help, but I wish you luck handling the rest of this. If you get stuck with some of the properties or objects then post again. A separate thread if it's not really the same subject (I suspect it won't be), but you can link to this one if you feel it may make it clearer.

One tip on searching for properties and navigating through class paths is to use the Object Browser facility (Found by pressing F2).
Oct 26 '11 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: gudia | last post by:
I want to Programatically generate Access reports in the pdf format using some tool and then email them to people in the same code. Right now I am trying to do this with pdf995 using VBA (emailing...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
5
by: Steven Taylor | last post by:
Hope someone can help. I have an application whereby in order to create one document type I effectively print out 3 or 4 access reports in correct order. So the user goes to the printer,...
2
by: Eagle | last post by:
Is there any way to make a print button on a form show the printer properties dialog before actual printing the report linked to the command button in AC97 ? I've noticed that opening the report...
0
by: dkurtz | last post by:
D. Lesandrini published an article some time ago about exporting Access reports as XML, and then updating those XML reports dynamically in ..NET....
16
by: JoeW | last post by:
I'm utilizing a database that I created within MS Access within a program I've created in VB.NET. I am using the VB front end to navigate the information, but want to be able to print a report,...
2
by: Morten Fagermoen | last post by:
Hi! How can I get the printer properties (the same as right click-properties in the Printer menu) in a VB.NET 2005 application. I have the collection of the printers but need to get to the...
4
by: MLH | last post by:
How do I ensure my reports are being printed in max resolution of 1200dpi ? That is, can Access control the setting?
3
by: Chocolade | last post by:
Im using win32_printer and im adding to listbox1 a list of the printer properties. but then when im scrolling down in the listbox1 and getting to the last property i see the list of properties start...
3
by: shimul | last post by:
Hi All, I am trying to combine multiple access reports in one PDF using pdfcreator, however it doesn't work for me... Can you please check the following code: Sub...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.