08-23-2018 07:08 AM
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?
Solved! Go to Solution.
08-23-2018 07:57 AM
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 (?)
08-23-2018 08:00 AM
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
08-23-2018 08:26 AM
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
08-24-2018 02:17 AM - edited 08-24-2018 02:33 AM
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.
08-31-2018 01:59 AM
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"); }