From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Local variable-based report location

Hello,

 

Does anybody know if it's possible to set the report location based on the value in a sequence local variable (in my case, loaded with the property loader in my sequence's first step).  I tried setting the report location by expression, but it doesn't give access to the sequence's local variables.  I think I understand why - the process model opens the report before my Main Sequence is ever called.  So I went to just move the report from it's current location using an Action step at the end of my sequence, but this won't work either, because the process model accesses the report after my sequence.  Arrgh!

 

Setting the report location by expression seems of very limited value with these restrictions.  It seems that I could edit the process model, but I really don't want to do this.  Is there a better way to customize the location of the report?

 

Thanks!

 

(Using TestStand 2010 SP1)

 

0 Kudos
Message 1 of 4
(2,900 Views)

The step in your process model that sets the path is called Determine Report File Path.  Rightly named! 🙂

 

It occurs between the PreUUT Callback and the MainSequence Callback.  If you override the PreUUT callback you should be able to change the report options.  You can access those using: RunState.Root.Locals.ReportOptions.  Depending on what you set in there will determine your path.  A whole bunch of those variables contribute to determing the path.

 

If you are using On-The-Fly reporting then you are up against a whole different challenge.

 

Regards,

0 Kudos
Message 2 of 4
(2,890 Views)

Hi Erik,

 

Have you looked at using the ReportOptions callback? That is called in the process model before the MainSequence and allows you to dynamically set the reporting options, including the location. More detailed information is located here.

 

Hope this helps.

 

-Jack

Message 3 of 4
(2,889 Views)

Jack,

 

Thanks for the pointer.  I had been hoping to avoid making any changes to the process model or callbacks, but it doesn't look like that will be possible.  Since the ReportOptions callback is called before my MainSequence runs, I don't have access to any of the local variables I need.  What I have done is simply moved the report to a new location by overriding the ProcessCleanup callback at the very end of the execution and passing data from my Main sequence to ProcessCleanup through a FileGlobal variable.

 

Thanks for the help!

 

Erik

0 Kudos
Message 4 of 4
(2,873 Views)