This happens when the Report Generation Toolkit's dynamic VIs are not included during the build process. Follow the steps below based on your LabVIEW version to include the dynamic VIs during the build process:
LabVIEW 2014 and Later
When building applications with Report Generation VIs, you must complete the following additional steps:
- Add the proper .lvclass files to your project
- If your application uses Microsoft Word, right-click My Computer in your LabVIEW project, select Add>File..., and select the following file: [LabVIEW20xx]\vi.lib\Utility\NIReport.llb\Word\NI_Word.lvclass.
- If your application uses Microsoft Excel, right-click My Computer in your project, select Add>File..., and select the following file: [LabVIEW20xx]\vi.lib\Utility\NIReport.llb\Excel\NI_Excel.lvclass.
- In the My Application Properties dialog box of the Build Specifcations select the Source Files tab located on the left.
- Then navigate to and select the .lvclass files you added to the project. After selecting the files, click the right arrow button located next to the Always Included box to add the class files to the Always Included list. This will add the class to the application.
: If the application you are building contains the MS Office Report Express VI, you must add any Microsoft Word or Microsoft Excel templates that you use to the LabVIEW project and to the application. You can do this by adding the templates to the Always Included
list under the Source Files
tab of the My Application Properties dialog box.
LabVIEW 8.6 to 2013
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.
- In your Project Explorer window, right-click on My Computer and select Add»Folder (Snapshot).
- 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.
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:
Note: 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.
- 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 LabVIEW7.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 LabVIEW7.x\vi.lib\addons\_office\_wordsub.llb. A file dialog box should come up. Select _Word Dynamic VIs.vi then click OK.
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
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
need to be mass compiled to re-link their VIs. Mass compiling is done by selecting Tools»Advanced»Mass Compile