LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

report generation report close

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.

 

 

Bruno Noronha

Certified LabVIEW Associate Developer





Using LabVIEW 8.6
0 Kudos
Message 1 of 7
(3,890 Views)

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.

0 Kudos
Message 2 of 7
(3,886 Views)

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

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 7
(3,885 Views)

@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

0 Kudos
Message 4 of 7
(3,864 Views)

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  

Bruno Noronha

Certified LabVIEW Associate Developer





Using LabVIEW 8.6
0 Kudos
Message 5 of 7
(3,848 Views)

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.

Bruno Noronha

Certified LabVIEW Associate Developer





Using LabVIEW 8.6
0 Kudos
Message 6 of 7
(3,835 Views)

hey bnoronha,

 

Can you add a screen shot of your program or upload the file here? Thanks

0 Kudos
Message 7 of 7
(3,742 Views)