NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Active Report Configuration in Sequence

Hi

With TS2012 SP1 in the Configure>Result processing dialog I have created a report configuration I would like to use with a sequance. Is there a way to set the report configuration option in the sequence?

I can see there is a ReportOptions callback - however its just a lot of properties (I think from the report dialog).

Since I have congfured what I want in the report dialog - is there a simple way to set the active report configuration on sequence load?

 

I ran a test last night and forgot to swap to my custom report conifguration from the default xml setup. 😞 

At least this page http://digital.ni.com/public.nsf/allkb/D58F2C45415179C786257AA9004E52D0 helped me get the results into excel (after hacking the registry!).

 

Cheers

Nick

 

0 Kudos
Message 1 of 4
(4,072 Views)

Nick,

 

the callback "ReportOptions" is indeed the correct location to set default values for reporting in a single sequence file.

Of course, you can place the same functionality in a sequence load callback, but you don't have the variables as parameter at hand there. So it is a little more effort to write the configuration into the correct place.

 

And you have to write the settings individually.

 

A complete different way would be to directly meddle with the config files from TestStand. You can refer to this post for a general entry point.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(4,063 Views)

Here is another approach (TS 2012 and beyond only):

 

a) In Configure>>Result Processing, set the configuration to contain a single result processor that has the report settings you want.

b) In a new sequence file, right click on the sequence list and select Sequence File Callbacks... Add a ModelPluginConfiguration callback.

c) Set a breakpoint in your new ModelPluginConfiguration callback and then run the sequence file with Single Pass.

d) At the breakpoint, select Parameters.ModelPluginConfiguration.Plugins[0] from the variables view and choose Copy.

e) Terminate execution, select Locals in the ModelPluginConfiguration and paste. Rename the new Local variable as MyReportConfiguration.

f) Expand Locals.MyReportConfiguration.Base.RuntimeVariables.InitializationState and set it to 0.

g) Add a statement step to the callback with the following expression:


SetNumElements(Parameters.ModelPluginConfiguration.Plugins, 0),  // clear existing configuration, if any. Delete this line to append your report to the existing configuration

Parameters.ModelPluginConfiguration.Plugins.SetPropertyObjectByOffset(GetNumElements(Parameters.ModelPluginConfiguration.Plugins), PropOption_InsertElement, Locals.MyReportConfiguration.Clone("",  PropOption_DoNotShareProperties | PropOption_CopyAllFlags))  // append my configuration

 


h) copy the ModelPluginConfiguration callback sequence to any file you want to use the report configuration you specified

 

 

Message 3 of 4
(4,057 Views)

Thanks Guys.

I like James' solution however it is a bit of a work around. I might create a suggestion on the ideas forum. 

 

At this stage I think the simple solution is a reminder dialog on SequenceLoad. 

 

Cheers

Nick

0 Kudos
Message 4 of 4
(4,044 Views)