NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Report viewer not processing style sheet in single pass.

I have a process model that generated XML reports. When I run a sequence in Sequence Editor using the single pass entry point, the report is displayed in unformatted XML, i.e. the stylesheet seem to be ignored. If I open the report file using MS Internet Explorer, it looks fine. When I run a sequence using the Test UUTs entry point, the report viewer in Sequence Editor processes the style sheet just fine. What is going on here?
0 Kudos
Message 1 of 6
(3,534 Views)
So that I can better address your question, could I know which Process Model you are using, which version of TestStand you are using, and verify that you are using the Process Models, etc. in the "XMLReports" example?
0 Kudos
Message 2 of 6
(3,534 Views)
I am using TestStand 2.0 with a heavily customized sequential model. I am using the components from the XMLReports example, apparently correctly, at least mostly, since it does generate the XML file properly and even displays it properly in Test UUTs.
0 Kudos
Message 3 of 6
(3,534 Views)
The stylesheet to be used to process the XML report is specified in the Locals.stylesheet variable in the AddReportHeader sequence of reportgen_xml.seq. The stylesheet processing instruction is added to the XML report in the "Add XML Prefix" step of the AddReportHeader sequence. The stylesheet path specified in the Locals.stylesheet variable can be absolute or relative. If it is relative, then it is relative to the location of the sequence file being executed.

Regardless, both the "TestUUTs" and "Single Pass" sequences use the same code in reportgen_xml.seq, therefore, it is as yet unclear why it would work in one and not the other. Would it be possible to send me your SequentialModel.seq file?
0 Kudos
Message 4 of 6
(3,534 Views)
Here it is. It contains numerous calls to a DLL I would not feel comfortable posting on a public site, but most steps that call it are diasbled when running in the editor.
Download All
0 Kudos
Message 5 of 6
(3,534 Views)
The problem is that the stylesheet path is being added only in the "Single Pass" and "Test UUTs" sequences, instead of both there and in the AddReportHeader sequence as in the original (release) reportgen_xml.seq file. The key thing to note is that what is displayed in the IE control within TestStand is only the contents of the Report object (e.g., what it might contain after a Reset or Load). It does not (in general) display the contents of the report file that is saved on disk (which would be what you would view from IE in Windows, outside of TestStand). The bottom line is that what you see in the IE control in TestStand and what you see in IE outside of TestStand are (in general) two different things.

If you look at the TestUUTs
sequence, the last step is a Load of the final report file that has been saved to disk. Because of this Load, in this case, viewing the Report in TestStand and in IE outside of TestStand yields the same thing. If you notice in "Single Pass", there is no such Load step. So in this case, the contents of the Report object in TestStand and the contents of the report file saved to disk (and viewed with IE) are two different things.

To solve the problem, I suggest putting back the "Add XML Prefix" step in the AddReportHeader sequence from the release version of the reportgen_xml.seq. This will add the processing instruction into the text contained in the Report object that will be displayed in the IE control in TestStand.
0 Kudos
Message 6 of 6
(3,534 Views)