04-10-2008 09:17 AM
04-11-2008 11:42 AM
mrbean,
This thread mentions two ways to modify the report to get the minute formatting. One is the within the sequence, another is by modifying the style sheet.
I think the easier way is to modify the style sheet located in <TestStand>\Components\NI\Models\TestStandModels\StyleSheets\report.xsl. There is a C style function that gets the time which you can modify. I have highlighted the line that outputs the time value to the report.
function GetTotalTime(nodelist){
if (gIncludeTimes){
var node = nodelist.item(0);
var text = node ? node.text : "";
return "<TR><TD NOWRAP='NOWRAP'><B><LI> Execution Time: </LI></B></TD><TD><B>" + ((text == '') ? "N/A" : (text + " seconds")) + "</B></TD></TR>";
}
else
return "";
}
You can simply calculate the minute values before this line and then format the output string to contain those values and labels.
04-11-2008 12:05 PM
04-11-2008 01:14 PM
"modify the style sheet located in <TestStand>\Components\NI\Models\TestStandModels\StyleSheets\report.xsl. There is a C style function that gets the time which you can modify."
You just have to open the above file and find this function.
The html report is generated by reportgen_html.seq and the txt report is generated by reportgen_txt.seq. Like the atml and xml sequences, the elapsed time is reported in the AddReportHeader sequence by steps called 'AddExecutionTime'. These do not use style sheets. You would have to modify each step in each sequence.
05-07-2008 02:10 PM
05-08-2008 10:15 AM
05-08-2008 11:47 AM
05-13-2008 10:33 AM
mrbean,
Yes you can change the format of the dates in TestStand. As this KnowledgeBase article points out you could simply change the date format for Windows, or you can use the custom Date() and Time() functions to build your own format.
08-05-2008 04:20 PM
I'm just now getting to this, and I've decided to address this in the reportgen_html.seq. In the step labelled "Add Execution Time", the expression reads,
Locals.Header += "<TR><TD NOWRAP='NOWRAP'><B><LI>" + ResStr("MODEL", "RPT_HEADER_EXEC_TIME") + "</B><TD><B>" + (PropertyExists("Parameters.MainSequenceResults.TS.TotalTime") ? Str(Parameters.MainSequenceResults.TS.TotalTime, Parameters.ReportOptions.NumericFormat , 1, True) + ResStr("MODEL", "RPT_HEADER_SECONDS") : ResStr("MODEL", "RPT_NOT_APPLICABLE")) + "</B>\n"I found the RPT_HEADER_SECONDS constant and changed it to _MINUTES and changed the string. I divided the Parameters.MainSequenceResults.TS.TotalTime by 60, and this all seems to work. The only thing that's not working is that I'm updating the Parameters.ReportOptions.NumericFormat, and no matter what I do it keeps showing me 13 decimal points.
The Parameters.ReportOptions.NumericFormat is set to %$.13f (but I've tried several variations).
I just want it to display something like 21.63 minutes. Also, what is the $ doing in that expression
08-06-2008 01:56 PM
I found that if I added to the ReportOptions callback of my application's sequence file, a statement like
Parameters.ReportOptions.NumericFormat="%.2f"
everything worked fine.