NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

New lines in report headers

Solved!
Go to solution

I am adding the sequence file requirements list to the report header. I would like to be able to display each requirement on a new line in the report header. Is there a way to do this? I tried doing the following in a Modify Report Header callback where I've added a couple function steps:

Step 1:

Locals.Requirements += RunState.SequenceFile.Data.Requirements.Links[RunState.LoopIndex] + "\n" 

Step 2:

Parameters.UUT.AdditionalData.SetValString("Requirements", 1, Locals.Requirements)

I would also like to be able to take the comment section from the sequence file properties and insert it into the header as well keeping the line breaks that are already there in the report header. Currently I'm just doing the following:

Parameters.UUT.AdditionalData.SetValString("Comment", 1, RunState.SequenceFile.AsPropertyObjectFile.Comment)
0 Kudos
Message 1 of 6
(2,277 Views)

Which type of report are you trying to add header data to?  HTML?  XML?  The solution will change depending on which one.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 6
(2,232 Views)

Ideally, I'd like to be able to do it in both ATML 5.0 and HTML, but I think HTML will be more important to have in the long run due to not needing a style sheet. (If I understand it correctly)

0 Kudos
Message 3 of 6
(2,225 Views)
Solution
Accepted by topic author cjohnson963

In the ModifyReportHeader callback you'll see a parameter called Parameters.ReportHeader.  That string will change depending on which report you are using.  If you are using HTML it will be an HTML string.  You need to inject your own HTML into that string.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 4 of 6
(2,215 Views)

Thanks, I've got it working a bit for HTML now. Would I need to do something similar for ATML (i.e. inject XML data into that same string matching the ATML format) or is there an easier way to do it?

0 Kudos
Message 5 of 6
(2,208 Views)

yes for ATML it would be similar.  I don't know of an easier way to do it.

 

One thing you'll want to do is look at the report format and then based on that apply the proper conversion.  You can look at the format by using Parameters.ReportOptions.Format.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 6 of 6
(2,200 Views)