Solved

VB6 Report Writer; Error 8555; Error obtaining printer information

Posted on 2004-08-31
4
2,023 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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 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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

920 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

14 Experts available now in Live!

Get 1:1 Help Now