Formatting numbers for output - thousands separators

The Format parameter of the reporting components in Pipeline Pilot include a Number Formatting paramter that allows you to specify the number of significant figures or the number of decimal places to be displayed.

Additionally, there is a Format() function in PilotScript that can convert a number to a string with a wider variety of options.

For example

Snum := Format('%4.2e', MyNum) ;

Will present the number in Scientific format to 3 significant figures.

None of these options currently allow you to use thousands separators eg 1,000,246  or 1 000 246

The attached component takes a somewhat brute-force approach using PilotScript to introduce those separators.  Note that the output is a string and cannot readily be converted back to a number so this should be the last operation on the property before display.

This was created using Pipeline Pilot 9.1 and has only had limited testing but I thought others might find it useful.

Malcolm