NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent xml stylesheet/teststand from creating tables for flow control steps

Solved!
Go to solution

I have tried to master the customization in the stylesheet for xml reports which we use in our Teststand environment. I saw that there was an option to turn of indentation for subsequences and that I could set the "gIndentationWidth" parameter to 0 to remove indentations completely, but I would like to prevent the stylesheet from creating a new table when it detects a flow control step. I have tried to modify some steps in the stylesheet but it seems to be pretty deeply integrated in the report generation or something because I can't make it stop.

 

Apart from customizating the stylesheet it may be possible to do it in the reportgenerator but I haven't found a way to do it. So I wonder if someone have managed to make this change?

0 Kudos
Message 1 of 6
(2,961 Views)

It seems that it can be done for html reports: https://forums.ni.com/t5/NI-TestStand/Customize-HTML-report/td-p/2012622

However the reportgen_xml.seq is done differently and seems to use modelsupport2.dll which I don't know if it's possible to change. Perhaps that means that the change has to be done in the stylesheet (?)

0 Kudos
Message 2 of 6
(2,952 Views)

Do you need the flow control steps to show up in the report at all? You can just disable result recording on the step in the sequence file and it will never make it into the XML. Sharing some screenshots would help better explain what you're seeing now.

-Trent

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 3 of 6
(2,951 Views)

Just saw your other reply - if it's the same issue in the screenshot in the other post, turning off result recording on the step will not help. I think this is a stylesheet change

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 4 of 6
(2,942 Views)

Yes I have Result Recording turned off on the flow control steps, but it still creates a new table for the steps that lies within the flow control step and it does make the report hard to read.

I have attached a screenshot showing the problem.

0 Kudos
Message 5 of 6
(2,914 Views)
Solution
Accepted by topic author j_werner

I have finally managed to solve this and it was correct that it was a stylesheet change in this case.

 

I found a function called: "function ProcessCurrentBlockLevel(nodelist)" in the horizontal.xsl sheet. In there I removed the sections closing and creating a new table when it detects a different BlockLevel value. It now looks like this (just commenting out the section):

 

function ProcessCurrentBlockLevel(nodelist)
{
	var sRet = "";
	var node = nodelist.item(0);
	var node1 = node.selectSingleNode("Prop[@Name='TS']/Prop[@Name='BlockLevel']");
	var curStepBlockLevel  = -1;
	if (node1)
		curStepBlockLevel = ConvertToDecimalValue(node.selectSingleNode("Prop[@Name='TS']/Prop[@Name='BlockLevel']/Value").nodeTypedValue);

	if( curStepBlockLevel == -1)
		return sRet;
		
	/*if (curStepBlockLevel != GetBlockLevel())
	{
		// Close current table
		if(GetAddTable() == '0')
			sRet = EndTable();
			
		SetIndentationLevel(GetIndentationLevel() + parseInt(curStepBlockLevel - GetBlockLevel(), 10));
		SetBlockLevel(curStepBlockLevel);
	}
		
	// add Start table
	if(GetAddTable() == '1' && (!gEnableResultFiltering || CheckIfStepSatisfiesFilteringCondition_node(node)))
		sRet += BeginTable();
	*/
			
	return (sRet + "\n");
}

 

Message 6 of 6
(2,878 Views)