Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Not displaying trailing zeros
Message
De
09/08/2005 13:13:10
 
 
À
08/08/2005 22:32:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01039444
Message ID:
01039588
Vues:
19
>>Hi all,
>>
>>My user doesn't want to see trailing zeros after the decimal beyond the second decimal place in a report. For example:
>>
>>If the value is 12.345, he wants to see 12.345 print.
>>
>>If the value is 12.340, he wants to see 12.34 print.
>>
>>How would I do this?
>>
>>Thanks very much!
>>
>>John
>
>The data can be transformed as follows: replace zeroes with spaces, apply alltrim(), replace spaces with zeroes again. This will take out all superfluous zeroes; in your case, you will have to add up to two zeroes again.
>
>You will probably want to put all this into a UDF.

John uses vfp6, so your advice is best. In vfp9, the TRIM function can be used to remove other trailing characters too, so not only spaces.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform