NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically selecting active report in TS2012

Solved!
Go to solution

TS2012

I have multiple reports configured (all different displayable reports), and they all generate just fine (they're all on disk where I think they should be)

At the end of execution, I get the default visible displayed report showing, and in the upper-right coner I have the "Active Report" control.

I am looking to find a way to dyanamically set (at the end of the execution -- decision is based on final results of UUT) the order of that list, and possibly remove some reports from the list.

 

Said a different way --

At the beginning of execution I want to start out with some defaults that generate 6 different reports, and they will be generated in order 1-2-3-4-5-6 and end up on disk.

After testing the UUT (but before the reports are displayed to the user) I need to remove some and reorder the rest, such that 4-2-6-3 are allowed to be selected from the "Active Report" dropdown (with 1,5 removed).  (and #4 is shown by default to the user).  Which ones get removed and how the reorder happens is based on the test results of the UUT.

 

Could I get a few pointers in this direction?

0 Kudos
Message 1 of 5
(3,599 Views)

Have you seen this forum post: http://forums.ni.com/t5/NI-TestStand/Set-Active-Report-Configuration-in-Sequence/m-p/2470748

This papaer has good information too: http://www.ni.com/white-paper/8289/en#toc1

                                                       http://www.ni.com/white-paper/14200/en

National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(3,556 Views)
Solution
Accepted by topic author warren_scott

I think you can modify the Execution.Reports collection to get what you want.

 

I configured two reports and then put the following statement in a PostUUTLoop callback to swap the order they appear in the list and it seemed to work correctly.

 

RunState.Execution.Reports.InsertExisting(RunState.Execution.Reports.Remove(0), -1)

0 Kudos
Message 3 of 5
(3,552 Views)

Yes, that seems like a good solution. Thanks for sharing.

National Instruments
Applications Engineer
0 Kudos
Message 4 of 5
(3,534 Views)

Thanks James --

 

That got me off to the right direction and I've got it working now.

 

0 Kudos
Message 5 of 5
(3,517 Views)