开发者

Crystal Reports - PrintToPrinter "The handle is invalid"

I'm using the Crystal Reports Basic for Visual Studio 2008 to print reports. I have just one user that gets periodic errors saying "The handle is invalid". If she tries printing a second time, it works just fine. I've looked over 开发者_JAVA百科her machine and it looks like it has all the same software as everyone else, and of course it never happens when I'm around.

The code I'm using is: frmPrint.LogTag1.PrintToPrinter(1, True, 1, 0)

I'm not sure if there is any other information that I can get from an end user machine to help me figure out where the problem is. ErrorToString() only returns that one line.


It is a low-level Windows error. Could be a bug in Crystal Reports, could be a bug in the printer driver, could be environmental with some kind of misbehaving system add-on. You'll never find out which it is if you don't have the source code for these large chunks of code so you can debug it. You don't and you can get it.

It is not a bug in your code, ask the IT staff to get that user another machine. If that doesn't help then you'll have to bounce this to Crystal Decisions (or whatever they are called these days). This is otherwise a standard IT matter.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜