Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currency field with 4 decimals in report
Message
From
13/06/2023 09:28:53
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
13/06/2023 09:23:16
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01686730
Message ID:
01686733
Views:
47
>>>Hello all,
>>>
>>>In my report I have currency fields. There are 4 decimals for those fields. How can I have only two decimals?
>>>
>>>Thanks in advance.
>>
>>#1 is this CURRENCY as field type or just a number with four decimals?
>>#2 Try to format it. The report field edit form offer fields for this. Format expression like 999999.99. See Format Expressions for Field Controls in vfp help. Check if the result is as expected (problems with rounding?)
>
>Use round(myCurrencyField,2) as the expression, in that case.

As for currency, ROUND() might be wrong. Book-keeping is not engineers maths. This is more CEILING. Why I wrote check

Update:
Aside where to round and sum.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform