Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Format in report
Message
De
24/05/2009 12:36:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
24/05/2009 11:57:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01401692
Message ID:
01401693
Vues:
58
A fixed format could be something like transform(fieldname, "###,###.##") - the tricky part is to convert this to a variable format. Something like this (not tested):

transform(FieldName, "###,###" + iif(num_of_showed_decimal_places > 0, ".", "") + replicate("#", num_of_showed_decimal_places)

>I have a table with the fields:
> codigo c(10),designacao c(40),value n(6,2),num_of_showed_decimal_places i(4)
>I want to condicionaly show in the report the value with zero,one or two decimal place acording with the(num_of_showed_decimal_places)
>
>1º If the value stored in the table is 10.22 and the num_of_showed_decimal_places=2 The report show 10.22
>2º If the value stored in the table is 10.20 and the num_of_showed_decimal_places=1 The report show 10.2
>3º If the value stored in the table is 10.20 and the num_of_showed_decimal_places=0 The report show 10
>
>Sorry for my bad English.
>Thanks in advance.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform