NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access objects collection

Solved!
Go to solution

How to access object collections e.g. ReportSections from Report object? I can access ReportSection but not its collection...

 

Reference: http://www.ni.com/pdf/manuals/372844e.pdf

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 1 of 3
(3,479 Views)
Solution
Accepted by bienieck

Maybe you don't understand exactly what report section is. According to the help:

 


Use objects of this class to store, update, and transfer reports. You typically use ReportSection objects to avoid creating copies of a report as the report is transferred between the report generator, process models, Report object, and ReportView control. You can create a new ReportSection object by calling the Report.NewReportSection method. ReportSection objects can contain other ReportSection objects.

Typically, a process model creates and updates the ReportSection object and assigns it to the Report object by setting the Report.ReportSection property.


 

 

It does have a subproperty called ReportSubsections which specifies a reference to the ReportSections object, which is a collection that contains a list of child ReportSection objects to the current object. Looking at this object, it's a list of items that you can index through to get each.

 

Certified-LabVIEW-Architect_rgb.jpgCertified_TestStand_Architect_rgb.jpg


"I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them." John Bernard Books

Message 2 of 3
(3,426 Views)

You were right I did not understand it, but i think now i got it 🙂

 

.  Report  /*Report associated with particular Execution*/  .  AsReport  /*Report interface*/  .  ReportSection.ReportSubsections.Item(/*item index*/)  .  /*Report section*/  ReportSubsections  /*Subsection of report section*/.

 

If I understand correctly, each Report object consist of hierarchical sections, which can be freely nested. So e.g. for some execution I can have a report. This report can have seperate section for header, footer and body. This sections form ReportSections collection and can be accessed with ReportSection.ReportSubsections.Item(/*item index*/). Furthermore e.g. body section can have seperate section for each result.

 

Moreover each ReportSection object has its content devided in header, body and footer string, but it is just string not subsection per se.

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 3 of 3
(3,417 Views)