11-19-2014 09:14 AM
I have what seems like a really simple problem but I'm having a hard time finding a solution. I am using TestStand 4.2.1 (2010 D3) using custom Sequential & Parallel Process models depending on whether or not the Test calls for multiple UUTs/Sockets. All I'm trying to achieve is after the test is complete, and the Report gets generated, I want to check to see if a StationGlobal variable (let's just call it AlternatePath) value exists with a valid directory path, and copy the exact same report to that directory (same name, same style etc).
I've checked the file ReportGen_ATML.seq file and there doesn't seem to be any special handling of the file, just basically concatenating the Report Header, body and footer. Obviously this can be achieved by manually copying and pasting the report after it is created, but it's more desired to be done at runtime.
Any thoughts or suggestions would be greatly appreciated!
Thanks!
Solved! Go to Solution.
11-19-2014 11:23 AM
My solution requires you to further modify process models.
In process model, both SinglePass and Test UUT entry point calls TestReport sequence to create the report in Execution.Report Object. Once the report is created, it saves the report in "Write UUT Report" step using Report.Save function. The first parameter of the function specifies the report file path.
If you want to create multiple copies of the report, you can do one of the following:
1. Execute "Write UUT Report" step multiple times by passing required file path as the first parameter.
2. The first parameter specifies the file path of the report. You can use it along with FileCopy method in C / .net / LabVIEW to copy the file to required location.
Note: The above solution might not work for On The Fly report generation.
- Shashidhar
11-21-2014 03:32 PM
Thank you for your response. I was able to do exactly what I needed. I'm not doing any OTF report generation, so that made it easier. For anyone interested I ended up using an if statement with the following conditional expression:
PropertyExists("StationGlobals.AlternateReportDirectory")
If it does, next check to see if it is empty. If it isn't then I added the following expression to construct the alternate path:
Locals.AltReportFilePath = StationGlobals.AlternateReportDirectory + Right(Locals.ReportFilePath, Len(Locals.ReportFilePath) - Find(Locals.ReportFilePath, "\\",0,False,True)).
I didn't bother to validate the AlternateReportDirectory path at this point. If it exists we're going to assume that it is correct.