06-21-2019 12:26 PM - edited 06-21-2019 12:30 PM
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)
Solved! Go to Solution.
06-24-2019 12:02 PM
Which type of report are you trying to add header data to? HTML? XML? The solution will change depending on which one.
06-25-2019 09:59 AM - edited 06-25-2019 10:00 AM
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)
06-25-2019 06:40 PM
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,
06-26-2019 10:25 AM
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?
06-26-2019 01:13 PM
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.