10-06-2022 08:08 AM
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
10-06-2022 08:30 AM
Hi,
It seems you have a printer name error (41002).
Are you sure you have the good name of the printer ?
10-06-2022 09:38 AM
I am sure, I’ve also tried leaving it blank, print to pdf, and XPS document writer.
10-06-2022 10:14 AM
Is there a default printer on the other computer?
10-06-2022 10:22 AM
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.
10-06-2022 10:43 AM
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.
10-06-2022 12:07 PM
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.