NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using ModifyReportHeader to add additional header fields

Hi there,

 

I'm trying to add some additional header fields to my HTML report in TestStand using the ModifyReportHeader callback, but the results do not seem to be propagating through to the report.

 

I am setting Parameters.UUT.AdditionalData.SetFlags("",0,PropFlags_IncludeInReport) in the PreUUT sequence, and then sending some information to the additional data parameter using the Parameters.UUT.AdditionalData.SetValString() method. 

 

This is working fine in the PreUUT loop, but I have some data that I do not get until I have run through some code modules, So I am trying to add some additional results using the ModifyReportHeader callback.

 

In ModfyReportHeader I am again calling Parameters.UUT.AdditionalData.SetValString() to add to the AdditionalData Container. When I step through the sequence, I see the additional fields appear correctly in the AdditionalData Container, however when my sequence completes, these additional fields are not displayed on the report.

 

I've attached some pictures to show what I mean. I can't quite work out why the PreUUT code works, but the ModifyReportHeader code does not, especially when I can see that the data is being added to the container.

 

Any help would be appreciated.

 

Kind Regards,

Lou

0 Kudos
Message 1 of 4
(3,093 Views)

Bumping this because I'm still struggling to get this work and also because I have a bit more information that might be useful.

 

I made a shell sequence file with all of my test specific code removed, but with the header code still there.

 

I tested the sequence with my report format set to ATML 6.0 and HTML. The sequence works, and adds the additional parameters with an ATML report, but when changed to HTML - which is what I ultimately need - the additional results that I try and add in ModifyReportHeader are not added. 

 

I've attached the Test Sequence and the supporting files. If anyone can help me work out how to get the additional results to display in the HTML report, I would be eternally grateful!

 

Thanks,

Lou

0 Kudos
Message 2 of 4
(3,050 Views)

Hi,

 

have you had a look at this document?

 

http://digital.ni.com/public.nsf/allkb/F8243CE782AFF42086256E62006B3FC1?OpenDocument

 

Best,

 

Rob

0 Kudos
Message 3 of 4
(2,998 Views)

To close the loop, this was answered after contacting NI Technical Support by placing the modify statement in the PostMainSequence callback instead.


Explanation:
The difference why it works with ATML, but not with HTML lies inside the ReportGen_ATML vs ReportGen_HTML "AddReportHeader" subsequence and how those reports are generated. 
The HTML report header is hard-coding the AdditionalData entries into the document, while the ATML report header is passing meta-information about the sequence which is filled in later. 


Solutions:
1) Add the AdditionalData at any point of the sequence before the GetReportHeader sub-sequence is called
2) Modify the Paramters.ReportHeader directly 

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