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: 

Executable and easy text report.vi

Solved!
Go to solution

After reading some of the knowledgebase articles and the discussion grps it sounds like I am missing somethng when I create an exe and include "Easy Text Report.vi" in my LV2012 Project.  If I run the exe in the admin window of Windows 7 the test results are printed out just fine.  If I copy a shortcut of the exe file over to a user window on the same machine nothing is printed.  Anyone know why????

 

Windows 7

LV2012

 

Thanks...

0 Kudos
Message 1 of 13
(3,283 Views)

Possibly Permissions. We use to run into the issue all the time where I worked because of security on the computer and everyone needing to be User status (only Test Engineers were admins). Usually it was a directory that needed to be accessible by all users. We had some company logo that was in a folder that we had to go change and allow all users access to that folder and then the report started generating right for the user accounts. Never ran into it during development because we were all administrators.

 

Try to give yourself some better error control and see if the EXE is producing an error that you can troubleshoot.

0 Kudos
Message 2 of 13
(3,264 Views)

Since I don't know whats going on I hate to disagree.  I'm just using the easy print ( to a printer) vi.   The other hundred or so vi's work w/o any trouble.  Why is is when I send a text string to this particular vi the code hangs up??  I found this in the knowledgebase, (http://digital.ni.com/public.nsf/allkb/8A0E6274D9BD7B1986256F62006AD402) tried it and it still does work.  i cannot find anything related to LV2012...Just up to LV 8.6.  The "logic" ( "loading a *.lib dynamically) in this KB sounds reasonable.  I just need to figure out how to do it in 2012 and if thats the prob. 

0 Kudos
Message 3 of 13
(3,253 Views)

Does the software create an error, and if so, what does the error say? It might explain what file or location that might need to be accessed, or more information about the issue.

0 Kudos
Message 4 of 13
(3,242 Views)

now I'm trying to figure out how to troubleshoot an exe. 

0 Kudos
Message 5 of 13
(3,223 Views)

What are you trying to troubleshoot? If this is a different issue you should create a new thread.

Thomas N.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 13
(3,199 Views)

tmf171 asked if the code threw an error.  I thought he was questioning the exe throwing an error and the only way to find that out was to enable debugging under the advanced tab.  Its not very intuative on how to use that once you create an exe w debugging enabled.  thats what i was getting at. 

0 Kudos
Message 7 of 13
(3,175 Views)

Maybe if you create a simplified EXE that just creates a simple report and have it so that the error displays on the front panel it might give you an indication of the error. You need to know why your exe does not work when logged in as a user but works fine when logged in as an administrator? As a brief test, enable read and write access to the national instruments directory in program files. Can you post your code?

0 Kudos
Message 8 of 13
(3,164 Views)

thats exactly what I did.  I'm using the easy text report vi.  In admin login as a standalone it works fine.  In the user login the exact same vi, exact settings and all throws -41002 error.  "Explain error" says its an invalid printer.  I've found that isn't always true and the exact same vi works in admin so I think its a windows permission settings. 

 

The printer does show up in the User window login ( start>devices and PRINTERS)  and I can print a test page.  It just won't let me print ANYTHING using the easy text report vi.

 

Any ideas what ??

0 Kudos
Message 9 of 13
(3,158 Views)

Doing a quick search on the forums for that error gives a lot of information. I guess that error is what the print VI throws no matter what the problem is. You can try printing to pdf as the default printer and see if the error is still happening. Try changing the default printer to the one you are using. (Maybe the 2 logins have different printers selected as default). Someone who has experienced error -41002 might be able to explain more than I can... There is a knowledgebase that talks about issues with margins, but I don't know how much help that will be. -41002 KB A few other posts appear, but nothing that would explain the difference between administrator and users permissions.

0 Kudos
Message 10 of 13
(3,152 Views)