Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trim trailing zeroes
Message
De
22/10/2013 18:27:10
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
 
 
À
22/10/2013 17:57:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01586185
Message ID:
01586188
Vues:
57
>I'm embarrassed to ask this:
>
>I can't figure out how to display a numeric value with the trailing zeroes trimmed. So, if the value is stored in the table as 88.99000, I want the value to display in a report as 88.99.

Do you want to always trim off any trailing zeroes, or do you want to always display a fixed number of decimal places?

The former is unusual in my experience. In cases where things such as parts prices are recorded to fractions of a cent, users often want to see those fractions even if they are zero, to confirm that's the value and not some rounded amount.

If you have values like 88.991 or 88.9901, then trimming trailing zeroes will lead to a ragged right edge in columns of numbers on a report and/or inconsistent position of the decimal point, both of which can make a report harder to read.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform