Solved

VB6 Report Writer; Error 8555; Error obtaining printer information

Posted on 2004-08-31
4
1,986 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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 designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now