09-12-2012 04:43 PM
Hi,
In TestStand 2010 SP1, I have the "report file path" as one of the column into the database using the RunState.Report.Location. This has been working until I upgraded to TestStand 2012. The RunState.Report.Location is always empty. I also tried to use the RunState.Root.Locals.ReportFilePath but I get an error that this is an unknow variable when logging to the database. Even when removing the <UUTStatus> from the file path expression below, there is no difference.
I am using the following report file path expression:
"C:\\TSReports\\<UUTStatus>\\<ClientFileName>_Report[<FileDate>][<FileTime>][UUT]_<UUTStatus>.<FileExtension>"
Which variable contains the report file path in TestStand 2012.
Solved! Go to Solution.
09-12-2012 05:01 PM
I haven't tried it, but RunState.Report.Location might work if you set the New Thread option on the Report and Database to False (assuming the report is first in the list) so you can be sure that the Report has been generated before you check that value.
You have to set the Configure>>Result Processing>>Show More Options to see the New Thread options.
This should give you access to the path of the Displayed report (the one with the checkmark in the Display column). However, in TS 2012, you can have any number of reports.
There is a new callback, GetReportFilePath, you can add to your sequences to obtain the report paths as they are determined. You could store the paths in a station global or runtime variable for later use if needed.
09-13-2012 08:21 AM
Thanks James_Grey! The New Thread options set to NO resulted what I was looking for.
11-02-2012 10:24 AM
Is there a way to programmatically set new thread option to No?
11-02-2012 12:15 PM
You can override the ModelPluginOptions callback sequence and set Parameters.ModelPlugin.Base.NewThread = False
03-21-2017 02:53 AM
Hi James,
thanks a lot,... this is exactly what I would need... unfortunately the RunState.Report.Location varaible is empty (seen in the watch window during execution of the main sequence). New Thread option is set to false. The GetReportFilePath callback seem to be called at the end of the sequence. Then it is too late to use it, or?!? :). So I also tried another one (SequenceFilePreStep) to get the Report location:
StationGlobals.resultDir = RunState.Report.Location; But this variable is still empty. This one:
StationGlobals.resultDir = Parameters.ReportOptions.Directory is not running. There are many Parameters / Variables / settings but none of them is working,... this is a bit frustrating 🙂
Can you help how to get the directory of the report as a variable during the main sequence run?
Thanks a lot
Matthias
03-22-2017
10:01 AM
- last edited on
10-29-2024
10:31 AM
by
Content Cleaner
Hello Matthias,
This thread hasn't been posted to in a while, so I doubt that James is still watching it. You are always welcome to create a new thread for your questions.
I found a help document that may be helpful to get started, but I would recommend creating a new thread for this if this does not help.
https://www.ni.com/docs/en-US/bundle/teststand/page/specify-report-file-path-by-expression.html
12-18-2019 12:35 AM
To add to this, the RunState.Report.Location will only be non-empty, if the "Display" checkbox is ticked on one of the active reports. (TS 2014)
Wanted to leave this here, in case, anyone else has the New Thread option set to "No", but are still having issues.