From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -41002 on new computer

The issue I'm having with my program that works fine on my computer but when I create a .exe file and run it on a different computer I get the error -41002 NI_Standard Report.lvclass:Print Report.vi. The program does everything else it is supposed to do like getting data from GPIB and digital inputs and outputs to usb-6501. The computer is also already running an older version of the program written with the same computer and prints the label with no problems I have tried downloading a version of NI Max on the new computer that is compatible with the LabVIEW 2013. I have switched the added a control for printer name. 

 

Thank you for your time

0 Kudos
Message 1 of 7
(1,068 Views)

Hi,

 

It seems you have a printer name error (41002).

Are you sure you have the good name of the printer ?

Message 2 of 7
(1,049 Views)

I am sure, I’ve also tried leaving it blank, print to pdf, and XPS document writer. 

0 Kudos
Message 3 of 7
(1,025 Views)

Is there a default printer on the other computer?

 

George Zou
Message 4 of 7
(1,012 Views)

Yes, I have tested this on two pc's that are not the one I wrote to program on, both have default printers, but I still get the same error. I also made sure that both the LabVIEW and the Runtime are 32bit 2013. 

0 Kudos
Message 5 of 7
(1,005 Views)

You can take a look Print Report.vi yourself.  There are only 2 cases you could get this error:

1. printer name not empty, it doesn't match any printer on the other computer;

2. printer name is empty, default printer is not set.

 

This VI enumerate all printers available on the computer.

You can do the same before call this VI.  And list printers for user to select.  No typo / name mismatch this way.

 

 

George Zou
Message 6 of 7
(989 Views)

I finally got it figured out! On my zebra printer I had to max out the print size to 4.25"W - 5"H even though the label that it is printing on is 1.5" square. I am not sure why it was a problem. Also, I still cannot use Print to PDF or XPS document writer but at least we can use the new program with the updated labels and faster data Aquisition. The old version would open and close a visa connection for each test where I set it up to open the visa at start and close visa when someone stops the program. The visa is to a Digibridge and each time you open the visa the bridge would take a second to configure to the settings. 

0 Kudos
Message 7 of 7
(968 Views)