NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Limiting decimal places in results

Solved!
Go to solution

Some of my measurements from VIs are coming back with an exceedingly long string of decimal points. Is there a way to have TestStand globally trim it down globally or individually for the report?

 

Thanks,

 

jvh 

0 Kudos
Message 1 of 16
(5,337 Views)
I don't know about globally (there may be one buried in reporting options somewhere) but for Numeric Limit steps at the very least you can use the Numeric Format field on the Limits tab to adjust your precision.
0 Kudos
Message 2 of 16
(5,332 Views)
Solution
Accepted by topic author jvh75021

I set the following in the ReportOptions within my ReportOptions callback:

 

Parameters.ReportOptions.NumericFormat = "%$.2f"

 

Or under Configure->Report Options select the 'Edit Format...' button near the Default Numeric Format control.

 

Help indicates: 

 

"Determines how the report formats numeric values for which you did not specify a numeric format."

 

Thanks,

 

PH

 

Message 3 of 16
(5,328 Views)
That was embarassingly straightforward 😉 Unfortunately, this field is disabled for ATML reporting (which I'm going to use as an excuse for not knowing about it) - the NumericFormat parameters still gets passed into the support DLL, but it doesn't affect anything. Anyone know a slick way of globally setting the numeric format for ATML reports?
0 Kudos
Message 4 of 16
(5,314 Views)

Thanks folks. A big help as I must deploy today..... 

0 Kudos
Message 5 of 16
(5,309 Views)

Asbo wrote:
That was embarassingly straightforward 😉 Unfortunately, this field is disabled for ATML reporting (which I'm going to use as an excuse for not knowing about it) - the NumericFormat parameters still gets passed into the support DLL, but it doesn't affect anything. Anyone know a slick way of globally setting the numeric format for ATML reports?

I think the ATML report data is simply XML. XML is more of a database than a document, so a number would be recorded in the file as it's datatype (double,I32 etc...)

 

I suspect you would need to modify the ATML stylesheet in order to change the way the floating point values are presented in a browser...

 

0 Kudos
Message 6 of 16
(5,292 Views)

Phillip Brooks wrote:

I suspect you would need to modify the ATML stylesheet in order to change the way the floating point values are presented in a browser...

 


Fair point, but why does XML reporting get to modify it then? 🙂

0 Kudos
Message 7 of 16
(5,287 Views)

Numeric format of measurements displayed in the report can be modified both in generated xml and/or in the stylesheet. It is recommended for customers to modify the stylesheet to display meansurement data with the required numeric format rather than generating the XML with a specific numeric format. Using the recommended approach preservers the measurement data in case it is required in the future. But, we understand that not everybody wants to modify the stylesheet, hence TS provides a way for customers to modify the numeric format of the generated xml also.

 

Regarding ATML reports, there is a known bug which prevents users from setting the numeric format for the generated XML.

This will be fixed in a future version of TS. 

 

Hope this helps

Regards

Anand Jain

National Instruments

0 Kudos
Message 8 of 16
(5,204 Views)

Thanks for the info, Anand.


Anand Jain wrote:
Regarding ATML reports, there is a known bug which prevents users from setting the numeric format for the generated XML.

Is there any workaround in the interim, by chance?

0 Kudos
Message 9 of 16
(5,202 Views)

asbo,

What version of TS are you using?


Regards

Anand Jain

National Instruments

0 Kudos
Message 10 of 16
(5,197 Views)