Solved

VB6 Report Writer; Error 8555; Error obtaining printer information

Posted on 2004-08-31
4
2,085 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
  • 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…

830 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