LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

printing trouble with NIreports

further informations about this problem : it happens with HP 970 Cxi printers and the NIReport_Print function returns NIR_ERR_UnknownAutomationError. It seems to be OS independent : the problem occurs with NT, 2000 and 98. On the same network, the report is correctly printed on a HP LaserJet 6MP.
0 Kudos
Message 1 of 4
(3,425 Views)
Hi,
If you take a look in the NI Knowledge base using a query of something like HP printers... there seems to be several reports of problems existing between NI products and HP printer drivers. Reading the symptoms of your problem, it would appear this could also be your problem...
If you look in the NI reports header file the erro rmsg that you are getting is passed directly from the server - I'm guessing that this means the printer driver...
Don't know what the fix is, but it may be worth emailing HP and asking their opinion.

(In the KB, most of the time they recommend trying an older driver, or even one for a different product... Maybe that's worth a try. If you can get some other driver - possibly without all the bells and whistles of the latest HP one - to
work, you could always install this as an alternative driver for the printer and use this driver when printing from your app)
Message 2 of 4
(3,425 Views)
Good digging here. I think that could be the exact problem here. Generally, when you have printing issues with specific printers when using the CVI printing functions, it is almost always caused by the specific driver implementation being used. I know that this may be hard to believe that so many different printer drivers are the cause and not CVI, but the following informatoin explains why.

CVI creates standard Windows GDI instructions for rending text and images on display devices and does not directly interact with the driver, it is up to the driver to be fully compatible with the Windows GDI subsystem standard and properly render all of the instructions. The printing functionality of CVI has remained unchanged for quite some time and has stuck with this method of using GDI only to maintain the highest level of compatibility with all output devices, but sadly many of the newer driver implementations have forgone GDI compatiblity to optimize their drivers to work best with certain applications. Now, if you think about it, since an older driver often can correctly output the graphics and text without incident (depending on when the printer was originally manufactured there may not be an older driver), it must be a change in the new driver that is causing this to happen, and the printer itself nor CVI is the problem.

The only other thing I can really suggest is trying using the SetPrintAttribute function to change some of the graphics printing attributes (changing text printing attributes is done in the same fashion), such as enabling bitmap printing and the print area size, as suggested in the following KB:

Link -> http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/7112309d1e886e5e862569ae006f77c0?OpenDocument

Explanation of GDI printing is found at the link below:

Link -> http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/0b33d74eefd61cb9862565fa00740196?OpenDocument

I hope this information helps and I wish you luck!
0 Kudos
Message 3 of 4
(3,425 Views)
Yes it helps, for my own computer knowledge, but a little bit less for my problem. I have emailed HP support to ask their opinion on this subject, but no answer yet. And yesterday, I unfortunately discover that the same problem (i.e. PrintPanel OK, Report_Print KO) exists with Epson Stylus printer. One more information : I use tables in reports (NIReport_TableStart etc...). Do you think the problem could be related to tables ?
Thank you
Chris
0 Kudos
Message 4 of 4
(3,425 Views)