08-14-2017 12:41 PM
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?
Solved! Go to Solution.
08-15-2017 12:57 PM
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
08-15-2017 02:16 PM
Thanks, I will give this a shot in one of the late callbacks and see what happens.
08-24-2017 04:06 AM
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.
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.
08-24-2017 10:34 AM
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