Solved

VB6 Report Writer; Error 8555; Error obtaining printer information

Posted on 2004-08-31
4
2,120 Views
Last Modified: 2013-12-25
I'm using VB6 and using the report writer.  I have several reports being generated without displaying them.  Some are landscape, others are portrait. Whenever the paper orientation is different than the printer default, I receive the error message "Error 8555, error obtaining printer information".  This has occurred on one printer (a Canon all-in-one laser printer).  I cannot get it to fail on any other printer I've tested (paper orientation switches fine).  Ex: Portrait printing with default set to portrait is find.  Landscape report on a portrait default fails. It's occurring on a Windows 98 machine.

Example code:

rpt.Orientation = rptOrientLandscape

Any ideas??  OS level - printer driver - VB code?

I'm open to alternatives (change code if necessary).
0
Comment
Question by:otterscope
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 18

Expert Comment

by:JR2003
ID: 11946536
Which version of VB are you on?
Which service pack have you got installed?
0
 

Author Comment

by:otterscope
ID: 11947833
Visual Basic 6.0 Professional, SP5
0
 
LVL 18

Accepted Solution

by:
JR2003 earned 250 total points
ID: 11947883
SP6 is now available, though a major Orientation bug was fixed in sp5. It is still pronbably worth downloading the latest service pack.

I've just had a look through some of my code for displaying a landscape report and I noticed I have this code after the ".Orientation" command. I'm not sure why it's there as it was a long time ago I wrote it, but it must be there for a reason.

        .Orientation = rptOrientLandscape
        .WindowState = vbMinimized
        .WindowState = vbMaximized

If it still fails it maybe something to do with the individual printer drivers, you could try downloading the latest version from the manufacturers website..
0
 

Author Comment

by:otterscope
ID: 11977551
Tried SP6 and the latest drivers.  No good.  This fails at the statement:

rpt.PrintReport

I know it's something to do with confirmation that the orientation is OK, but cannot find other printer related VB code that may let me override this.

Anyone have any ideas?  I'm stuck.

Thanks.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question