Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Squeezetext
Message
 
À
26/09/2008 13:01:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01350791
Message ID:
01351046
Vues:
18
>Hi Bo -
>I decided to do it with a second parameter as in
>if alen(this.aParameters) > 1
>	if upper(this.aParameters[2]) = "NUMBER"
>		toObjProperties.text = transform(toObjProperties.value)
>		toObjProperties.Reload = .t.
>	endif
>endif
>This works fine if the number is an integer. However if its a decimal I get a string of unwanted zeros on the end. I'm not sure why, but I am trying to limit the decimals to only those that are supposed to be there. Any thoughts?

You may have to add the 2nd paramter picture clause to the transform command, specifying the format you want. Or try using
toObjProperties.text = ALLTRIM(PADL(toObjProperties.value,16))
Sometimes PADL returns a more acurate representation of the underlying numeric value. TRANSFORM can be affected by outside influences, like SET DECIMALS. But if you know the number of decimals you want, set the picture/format value in the report and your problem may go away without custom code in the ReportListener.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform