05-04-2012 09:17 AM
Hi forum users -
I've been stuck on a problem for a couple of weeks now and I could really use some help.
Project Details:
I have a SubVI that creates and appends a series of texts and graphs to a Word Document generated using the Report Generator Toolkit.
This SubVI must be opened several times to continue creating the report based on user inputs and if the Document is left open I get an error message
MY SOLUTION: if leaving the report open gives me an error then I should close the word Document
The problem: I've tried using the dispose report function and get an undefined error message
I have tried using ActiveX functions directly and I managed to crash LabVIEW (probably due to the fact that I've never used ActiveX before)
Below is a bit of the end code.
Thanks for the help or any new light on this issue.
05-04-2012 09:22 AM
If you want to use ActiveX automation exclusively, there are examples included with LabVIEW on located under Communicating with External Applications.
You wouldn't want to mix RGT and ActiveX automation.
05-04-2012 09:25 AM
Are you writing the data into the report in the sub vi and you are opening the sub vi many times?. You can keep the window state as no change while creating a report and you have to use an Action Engine to define the state of the report (Create/open, Write data, Read Data, Close report) So whenever you write the data to the report you will not get any problem.
Good luck
05-05-2012 06:37 AM
@bnoronha wrote:
Project Details:
I have a SubVI that creates and appends a series of texts and graphs to a Word Document generated using the Report Generator Toolkit.
This SubVI must be opened several times to continue creating the report based on user inputs and if the Document is left open I get an error message
MY SOLUTION: if leaving the report open gives me an error then I should close the word Document
A better approach would be to modify the subVI to be able to work with an open Word document and report.
Ben64
05-08-2012 07:40 AM
Yes -
I spent a good deal of my weekend working with this and I modified everything to work with an Open word document.
Not what I was hoping for but at least it's working
05-25-2012 12:40 PM
Thought I would post a follow up on this issue because it gave me one heck of a headache.
The root cause of my crash was actually a syncronization issue.
I made a rookie mistake and forgot that left to right and up and down dont mean diddly in LabVIEW.
I had two VIs that called on the same word document and when I did a highlight execution I noticed that the functions were actually trying to call up my word document at the same time which crashed my LabVIEW.
Using the Obtain Notifier and Wait on Notification VIs I managed to guarantee that one of my ActiveX VIs was only called up once the other one was finished.
This totally cleared up my issues.
06-23-2014 01:46 AM