07-28-2017 01:40 PM
I have a program that runs in development mode but fails after I build the executable and try and run it.
I have attached a screenshot of the error and details as well a screenshots of the vi itself
07-28-2017 01:50 PM
Do you have Word installed on that machine?
07-28-2017 02:37 PM
I do have word and excel installed on the machine.
When I run this in the development mode there are no problems, both the word and excel files are created properly
07-28-2017 03:08 PM
Looking at your BD, you have no code in there that references the Word report class. So if you check your project dependencies, the NI_Word.lvclass is not included because it's not used.
However, your code works in the DevEnv because it knows where to find this class definition when it's needed. I think if you'll drop a Word specific VI into your diagram, this class definition will be added as a dependency in your project and you should be good.
07-28-2017 03:16 PM
Just to add to my previous comment, you have selected Word as the report type but that is not evaluated until runtime. So the compiler doesn't know that you are using a Word report. The functions in your VI are standard functions that are available for all report types (HTML, standard). However, when you drop a Word specific VI into your BD, then the compiler knows that Word is the report type being used and can include the necessary class definition as a dependency.
I hope that makes sense.
07-28-2017 03:39 PM
I was just going through the word specific vi's under Report Generation. The word file I am producing is simply (up to) 24 images of a graph on the front panel of my main vi. I cannot see any word specific vi that is intended to append an image to the report in progress. Am I missing something?
07-28-2017 03:48 PM
I'm not saying you need to use the Word specific VI. I'm only saying that you need to drop one onto the BD so that the Word class definition is added to your project.
For example,
07-28-2017 03:53 PM
I solved the problem. I used a word-specific vi to add a title to the word document and it now works.
Thanks for all your help!
07-28-2017 04:05 PM
@GerryT wrote:
I solved the problem.