Error 7 When Running an Application Using VIs from Report Generation Toolkit

Updated Nov 5, 2018

Reported In


  • LabVIEW
  • LabVIEW Application Builder Module
  • LabVIEW Report Generation Toolkit

Issue Details

When running an executable that uses VIs from the Report Generation Toolkit for Microsoft Office, I get the error:

Error 7: File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.  

The VI successfully runs in LabVIEW and there were no errors during the build process. Why am I getting this error?


This happens when the Report Generation Toolkit's dynamic VIs are not included during the build process.  

LabVIEW 8.6 and Later 
Versions of the toolkit with LabVIEW 8.6 and later use LabVIEW classes, which dynamically call VIs depending on what report type is being generated. In order to build an executable that uses dynamically called VIs, you must include these VIs in your build specifications. 

Application Builder only lets you add files that exist in your project to a build specification, so you must add these files to your project first. In your Project Explorer window, right-click on My Computer and select Add»Folder (Snapshot). Then navigate to C:\Program Files\National Instruments\LabVIEW x.x\vi.lib\Utility\NIReport.llb or C:\Program Files(x86)\National Instruments\LabVIEW x.x\vi.lib\Utility\NIReport.llb (where x.x refers to the specific version of LabVIEW being used) and click Current Folder. Repeat the same procedure to add the LVClass folder by navigating to C:\Program Files\National Instruments\LabVIEW x.x\vi.lib\Utility\LVClass or  C:\Program Files(x86)\National Instruments\LabVIEW x.x\vi.lib\Utility\LVClass

After you have the two folders in your LabVIEW Project, you can add them to the Always Included section of the Source Files category of the Build Specifications as in the picture below.

You need to add these files to the "Always Included" section of your Build Specifications so that those classes will be bundled together into your executable and your main VI can use them.

Notes: See the Related Links below to resolve name collision warnings. 

LabVIEW 8.0, 8.2, and 8.5 
Application Builder only lets you add files from your project therefore you have to add this file to your Project Explorer first:

Then you can add it as a dynamic VI inside the Application Builder: 

If you are using the MS Office Report Express VI, you should include the template used by the Express VI in addition to your application. The configuration of the MS Office Report Express VI relies on a report template which is either a basic template provided in the LabVIEW templates directory or a custom template provided by the user. When an executable is created with the MS Office Report Express VI, the template must also be included as a support file in the Source Files tab. This will add the template to the "data" directory so that the executable will be able to call it upon execution of the program. 

LabVIEW 7.x
To add the Word and Excel dynamic VIs in LabVIEW 7.x, click on the Source Tab in Application Builder and select Add Dynamic VI. 

If using Microsoft Excel, please include the path LabVIEW 7.x\vi.lib\addons\_office\_exclsub.llb. A file dialog box should come up. Select _Excel Dynamic VIs.VI then click OK.

If using Microsoft Word, please include the path LabVIEW 7.x\vi.lib\addons\_office\_wordsub.llb. A file dialog box should come up. Select _Word Dynamic VIs.VI then click OK

LabVIEW 6.x
When you build a stand-alone application or DLL that uses the LabVIEW Report Generation Toolkit 1.0, the support file directory containing _wordsub.llb and _exclsub.llb must be located in the same directory as the application or DLL and it must be in a subdirectory named Data (the default support file directory for the Application Builder). If Error 7 is still thrown when executing the application, _wordsub.llb and  _exclsub.llb need to be mass compiled to re-link their VIs. Mass compiling is done by selecting Tools»Advanced»Mass Compile.

Additional Information

Some additional troubleshooting steps include verifying:
  1. The path being written to matches the exact path on the computer; including spaces
  2. Both the Windows User and the Application (.exe) has read/write access and Administrator privileges
    • To set this privilege on your Application, you can  Right-Click on your .exe file and select Run as Administrator
Sometimes after following these steps, a broken VI error will occur in the Report Generation Toolkit due to differences between versions of Microsoft Office. To resolve this, follow the steps in this article.


Not Helpful