NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Renaming a test report programatically in 2013

Solved!
Go to solution

I am trying to rename a test report programmatically in TestStand 2013. 

I have tried using the ReportOptions callback, but it occurs too early in the model, before I have actually serialized the UUT in my sequence.  I've tried the TestReport callback with the RunState.Report.Save() function, but this just creates an empty report in the new location. Using the RunState.Report.Load() doesn't move the data from the current temporary file to my new location.  I keep putting things later and later in the callback routine's, but nothing seems to work. 

 

I tried following some old threads, but nothing out there seems to get me what I want either.

 

Any suggestions out there?

0 Kudos
Message 1 of 5
(2,737 Views)

I have not personally tested this out, but it might be a possibility. If you know the name of the report, and can determine it programmatically, you could use a callback towards the end of the process after the report is done generating. From there you can rename the file as seen in the KB below.

How Can I Programmatically Rename a File using TestStand?

 

-Ryan M

0 Kudos
Message 2 of 5
(2,692 Views)

Thanks, I will give this a shot in one of the late callbacks and see what happens.

0 Kudos
Message 3 of 5
(2,684 Views)
Solution
Accepted by topic author rimfire44

This is from legacy system so I cannot comment on why we have chosen to do things like this.  Perhaps we ran into the same problem you are seeing and wanted to be more in control.  It is a work-around rather than a solution to your issue.

 

We have configured our TestStand stations, using the Report Options Dialog, to store a copy of the Results file to a defined (temp) location (see below) following each test run. 

 

TempReport.PNG

 

The report file is generated and overwrites the previous one following every test run and then rather than attempting to rename it we copy it (we use a LabVIEW VI for this) from the temp location to wherever we want it giving it any filename we want.  Our VI appends Test Station Serial No., Time, Date & Test Result onto the filename. The copy is done from within PostUUT.

0 Kudos
Message 4 of 5
(2,640 Views)

Steve,

I got your suggestion to work. Very sharp idea. I had tried about five other methods over the course of a few days.  Thanks for the solution!

Dave

0 Kudos
Message 5 of 5
(2,632 Views)