12-10-2015 05:57 AM
Hello everybody,
I need help in TestStand reporting. I am using TestStand 2014 and Labview 2014, both 32 bits.
The situation is like this: I am running a test with 3 test steps. The first test step is an 'additional result' step which records the device under test info (software hardware versions etc...). These information will appear in the report and as result data in the database (prop_result table). The next 2 steps are 'real' steps which measures something.
In the report, there is a variable call 'Number of Results' (see the attached screen shot) and it shows a '3'. There are actually only 2 'real' test steps as I do not want to consider the first 'additional result' step as a test step. How does one influences the 'Number of Results' variable so that it does not count this first step? I tried using the Properties->Run Options->Result Recording Option to set it to 'Disable'. It works and the number of Results appeared as '2', but the device under test info do not appear in the Report and also not in the database's prop_result table.
In general, how does one get the number of results to not count a step, but still display its result in report and database? Is there an API where I can access it and modify its value (Number of results value) such as: 'Number of Results' - 1?
Hope somebody can point me to the right direction. I attached the report output and also the sequence file.
Yours,
hlim
Solved! Go to Solution.
12-11-2015 07:55 AM
Why do you want to do this? That helps to find a sloution for your problem.
What requirment/benifit is met/recived when you get a 2 instead of a 3.
12-11-2015 08:01 AM
Hello JohanHoltby,
that's a good question. I also asked the same question to the user but it is stated in the requirement. I guess some people are just uncomfortable knowing there is only 2 test measurements and the 'Number of Results' shows 3 in the report.
Is there a way to customize this 'Number of Results' variable?
Yours,
hlim
12-11-2015 08:44 AM
Hi,
It is posible. Requirments are what we are paid to forfill (even if, as you have, it's often worth atleast asking if the order knows why they want that and how much it's gona cost in time spent).
So the solution is toedit the report generation.
http://www.ni.com/white-paper/8289/en/
http://www.ni.com/white-paper/3977/en/
Thouse two links should get you started on that topic.
Hope that helps. 🙂
12-14-2015 03:48 AM
Hello Johan Holtby,
ich read through the documents you attached. It seems that the parameters.attribute is the API to change using the Modify Report Header callback. However I am not able to find the name of the attribute. In the report XML file, I can see that the attribute is call 'StepCount'. I am still working on it. If you have another tip, please share it with me. Thanks.
Yours
hlim
12-14-2015 04:05 AM
I ment you can edit the XML generator seq. --> <TestStand>\Components\Models\TestStandModels\reportgen_xml.seq (ref http://www.ni.com/white-paper/3977/en/).
It's the AddReportHeader you need to edit. Or more specific step 9 (in teststand 2012) which is a statment -->
Parameters.ReportHeader += "<" + FileGlobals.ReportElementName + " Type='UUT'" + " Title='" + ResStr("MODEL", "RPT_HEADER_TITLE") + "'" + " Link='" + Locals.UUTItemNameForLink + "'" + " UUTResult='" + Str(Locals.Status) + "'" + " StepCount='" + Str(Parameters.StepCount) + "'" + ">\r\n"
and then you can edit the StepCount varabel using some filtering e.g. using a subsequnce which is only counting the type of steps your customer wants to be counted.
There might be esier ways out there but this is what I would do.
12-14-2015 09:01 AM
Hello Johan Holtby,
thanks for your tip. This will do it.
Also there is an alternative to implement this, simply not use the StepCount property. Use my own parameters (e.g. FileGlobals.NumTestSteps) instead to count whichever step I want to count (Properties>Expressiosn>Pre-Expression>FileGlobals.NumTestSteps++) and display in the report.
Use ModifyReportHeader to add it into the Parameters.ReportHeader property. (e.g. Parameters.ReportHeader += FileGlobals.NumTestSteps.GetXML(XMLOption_NoOptions,0,"NumTestSteps", Parameters.ReportOptions.NumericFormat).
In the style sheet, display this parameter in the report header section, see below:
<tr valign="top">
<td style="white-space:nowrap">
<span style='font-size:0.6em'>
<b>Number of Results</b>
</span>
</td>
<td style='white-space:nowrap'>
<span style='font-size:0.6em'>
<xsl:value-of select="//Report/Prop[@Name='NumTestSteps']"/>
</span>
</td>
</tr>
Yours,
hlim
12-14-2015 09:31 AM
Happy you got a way forward.
As long as the customer is happy :).