Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Limit number of decimals on report fields?
Message
 
À
16/09/2008 13:27:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01347984
Message ID:
01347993
Vues:
8
As an alternative you can use "Stretch with overflow" option. Otherwise the textbox width must be big enough to contain all the digits, and then you should know in advance how many to expect. Also, besides round() and transform() you may also try PADL().

>How can I limit the number of decimal places printed on the report for calculated fields?
>
>For instance, when I use JobItem.Qty*JobItem.Price on a report textbox, it wants to print many decimal places, but I only want 2 decimal places.
>
>When I use formatting like '999.99' I am always frustrated, because I do not know how big the number will be, so I have to guess how many digits to allow for on the left side of the decimal. I hate having to hard-code liek that. Maybe the result will require '999999.99', but if i make it that big it will print '******.**' on the report becuase the textbox is not big enough to hold all that.
>
>My point is that I want to contrain the number of digits on the RIGHT side of the decimal, but allow as many places to the LEFT of the decimal as required, without me having to tell it how many to allow for.
>
>Do that make sense?
>
>I have also experimented with TRANSFROM, but I still couldn't really get what I was after.
>
>Maybe I need a user function?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform