How to account for trailing zeros in reports using SQL Server database

If using a SQL Server database, reports that use number data fields may display with 5 trailing zero’s because the report template needs to have the data number field formated.

For example, if have entered in 1.5 for labor hours in a workorder, the Detailed Workorder report may display the quantity in the report as 1.50000 instead of 1.5

This is easily fixed by either of the following:

A. Format the number data field tostrip the zero’s by typing in {0:g29} in the FormatString property for the data field or

img

B. Format the number data field to use your operating systems Regional settings for numbers digits after decimal by selecting to use the Standard Type n in the FormatString. (i.e if your regional settings is set to display 2 digits after the decimal, setting this will set the data number field to display showing 2 digits even if a whole number - 1.50 for example)

img
img

EDIT UPDATE: images that were associated with this forum post are no longer available.
Please refer to screenshots at Format Quantity to remove trailing zeros on a Simple Number field and Format Quantity to remove trailing zeros on a Sum field