NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable report generation (report.xml) through .net

Hello
I want to disable the Test Stand report generation at runntime through .net code.
i tried the follow code:

Engine

engine = axApplicationMgr1.GetEngine();

engine.DisableResults =

true;

but it dont like like it do the work. any idea?

0 Kudos
Message 1 of 5
(3,816 Views)
Hello Yaniva,

instead of "Engine" class you should use "StationOptions" class to disable report generation. This property "Engine.DisableResults" is obsolete.

Sample>>
IEngine engine = this.axApplicationMgr.GetEngine();
StationOptions stationOP = engine.StationOptions;
stationOP.DisableResults = true;
Regards
MY
0 Kudos
Message 2 of 5
(3,812 Views)

Hi,

Although the Engine.DisableResults is obsolete it still should work.

From your subject title you ask how to disable report generation. The DisableResults method, which ever one you use, doesn't disable report generation. This actually disables the Step(s) recording a result which is not the same as Disabling Report Generation.

The ReportOptions.DisableReportGeneration = True will disable the Report Generation.

You can do this in the ReportOptions Callback. But if you miss this, as it called at the start of the test run, then you will have to set the property RunState.Root.Locals.ReportOptions.DisableReportGeneration = True.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 3 of 5
(3,809 Views)

Thanks, but still

How can i get the object ReportOptions at runntime?

0 Kudos
Message 4 of 5
(3,807 Views)

Hi,

Get the SequenceContext as a PropertyObject then you can use SetValBoolean method using the lookup string of

"RunState.Root.Locals.ReportOptions.DisableReportGeneration"

You can get the SequenceContext from the ExecutionViewMgr

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 5 of 5
(3,801 Views)