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: 

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
(3,641 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
(3,632 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
(3,626 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
(3,613 Views)