LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intermittent Reporting Issue using Report Generation After Application Build

Hey everyone,

 

So long story short: the report generation VI I created based off of an NI live reporting example works on my computer, even built, but for some reason not on my coworkers. It creates most of the report but then occasionally just doesn't (?) and generates an error saying "File in use by another user" or something to that extent. They are running the application in administrative mode using office 2010. Is this anything within my reporting structure or is it something to do with the way that the application is built? I have already selected "Pass all command line arguments to the application" under advanced to try a solution and it did not fix the issue.

 

I've attached the reporting VI (please excuse the data formatting there, it's a little crude). Any help with this issue would be appreciated.

 

Thank you!

0 Kudos
Message 1 of 6
(1,728 Views)

Another user on the Forums reported something similar.  Like you, the second Report Generation Toolkit function was an "Append to Report", but like you, there was no Report opened to which to append.  Try replacing this function with Excel Easy Report and see if that helps.

 

Bob Schor

0 Kudos
Message 2 of 6
(1,693 Views)

I made the change and it worked for a while, however later on in the day it had a failure with it. It seems like it's possibly not saving or closing the report properly, which creates an issue when the next step wants to write to it.

 

Is there another method of closing the report in between repetitions?

0 Kudos
Message 3 of 6
(1,640 Views)

@AnthonyMN wrote:

I made the change and it worked for a while, however later on in the day it had a failure with it. It seems like it's possibly not saving or closing the report properly, which creates an issue when the next step wants to write to it.


I'm puzzled -- if you close the report, how does "the next step wants to write to it"?  It sounds like you are doing much more than is shown in the Excel Reporting SubVI that you posted.

 

In my experience with the RGT, I've only had a single Report opened at any given time (indeed, most of my programs only work with one report, and have a single New Report and a single Dispose Report function).  I have seen issues where a User "manually" closes an Excel WorkBook and finds that the Save Report/Dispose Report sequence deletes the just-written Report (which is why I wrote a "Save Excel if Not Closed" function to "surround" the Save Report to File function).

 

If you are using multiple Reports, you may well run into trouble.  Without knowing more about what you are doing, it is difficult to suggest improvements ...

 

Bob Schor

0 Kudos
Message 4 of 6
(1,632 Views)

It is opening and closing the report when it writes to it at the end of a repeated step in the program. On the first runthrough it should create the report, in subsequent runthroughs it appends to it.

 

It is in a nested while loop - to clarify.

0 Kudos
Message 5 of 6
(1,631 Views)

OK, so your code (most of which we haven't seen, only a single sub-VI) has a bug in it.  If you post the entire code (if it's in a LabVIEW Project, compress the folder containing the Project and attach the .ZIP file), we can take a look at it and probably find the problem (I have a pretty good idea of where to look).  Otherwise, fix the third function from the left half-way down the screen on the fourth VI.

 

Bob Schor

0 Kudos
Message 6 of 6
(1,619 Views)