NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Execution Time Format

I want to get rid of the decimal portion of the Execution Time that prints on my test report. At a minimum, I want it to display only one significant digit. Below is the expression that is found in the reportgen_txt.seq for the
f(x)Add Execution Time. What I'm wondering is, 1) how do I modify the format, 2)In general, how do I find out what is allowable in this expression.

Locals.Header += Str(ResStr("MODEL", "RPT_HEADER_EXEC_TIME"), "%-30s") + (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")) + "\n"
0 Kudos
Message 1 of 4
(3,183 Views)
Hi,

The format for the Str() is Str(value, , , , )

as you can see the format string is the second parameter. This is normally Parameters.ReportOptions.NumericFormat which is set as default in the Configuration Report Options as %$.13f, this is a C (printf) style format string. Which is a float with 13 places of precision.

Therefore you can changes this to say %$.1f which would be 1 place of precision.

Dont change it in the Configuration Report Options because this will affect everything, such the results, limits and so.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,182 Views)
Wouldn't I just change it right in the expression that is found in the reportgen_txt.seq. This should only effect the Execution Time that shows up at the top of my report, correct?
0 Kudos
Message 3 of 4
(3,180 Views)
Hi,

Yes, sorry I didn't make myself clear enough.

Yeah the Step 'Add Time'

Ray.
Regards
Ray Farmer
0 Kudos
Message 4 of 4
(3,177 Views)