LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni_Report.lvclass fails when running .exe

I have a test utility, built in LabVIEW 2016, that writes data to a Microsoft Word document.

Both development and target systems have Win10 installed and the target system(s) have LabVIEW 2016 Runtime engines installed (LVRTE2016_f2Patchstd.exe)

Everything operates properly on the development system, but when I run the .exe on the target system(s) I get an error at "Ni_report.lvclass:New Report - Get LVClass Default Value.vi".

I have included the NI_report.lvclass library in the build structure.

Even attempted to resolve issue by copying the entirety of the Utility folder onto the target system at the file path of C:\Program Files(x86)\National Insturments\LabVIEW 2016\vi.lib\Utility\........

I cannot seem to be able to get the items from the Report Generation Toolkit to operate correctly on the target system(s).

What the heck am I doing wrong???

 

0 Kudos
Message 1 of 3
(2,795 Views)

Hello,

I have a few questions:

  • Are you getting an error code when the error occurs on the target system?
  • Are you trying to run this exe on the same machine, or a different machine?
  • If different, what versions of Microsoft Office do the two machines use?

I found an article that may be helpful, it looks like it may be related:

http://digital.ni.com/public.nsf/allkb/8A0E6274D9BD7B1986256F62006AD402

 

Matthew

AE | NI

0 Kudos
Message 2 of 3
(2,755 Views)

I just dealt with something like this today, so this may help you.  Since you mention the Runtime engine, am I correct in assuming you are trying to create a compiled executable (which is what I did)?  

 

What happens when that particular VI runs as part of an executable is that the "New Report" subroutine uses the location of the executable as the basis for a relative path to find the .lvclass file.  Since your executable is not the LabVIEW executable, this will end up pointing to the wrong location.

 

The answer is to embed the files inside your executable.  This will make the .exe a little fatter, but it will allow the subroutine to locate the file. In your Build Specifications for your project, select "Source File Settings."  For both NIReport.llb and LVClass: make sure to check the box for "Set destination for all contained items" then select your executable from the destination pull down menu.  I've attached a picture of this, but I'm not sure how well it will display.  

 

(Also, forgive me for calling my DAQ program MAJIC; I blame the committee.)

0 Kudos
Message 3 of 3
(2,665 Views)