I have a decimal number(field in report) and I tried to use DecimalPlaces property of the field 0:0, because I need numbers before decimal separator:
example:
I have: 26,154.97 and I need: 26,154
and 0:0 doesn't do that.......after that I tried with ROUND:
SalesAmount[j] := ROUND(SalesAmount2[k],1,'>');
and with this I got 26,155.00
I know that i can cast it into integer, but is it possible to do with decimal?
Thanx
misha fka voodoo
0
Comments
try it with:
SalesAmount[j] := SalesAmount2[k] DIV 1;
br
Josef Metz
Josef Metz
But this leaves you with a text, not a decimal :?
Solution with format is ok, but after that I must cast it into decimal because must do some calculations
Leaving the .00 is only usefull when presenting the value :?
Or am I missing the point here :?:
http://www.BiloBeauty.com
http://www.autismspeaks.org
I think that you didn't understand me, because I don't want to see anything after the decimal separator... that .00 i don't want to see
As far as I know there is no difference in calculating with 26,154.00 and 26,154
In the database they are decimal values, the .00 is not stored in the database but only appears on presentation.
The database contains 26154 (Or some weird BCD value)
try to change the Property "DecimalPlaces" to 0:0 in the output control.
br
Josef Metz
Josef Metz
??? You need to do that only on output - and on output you do not do calculations...
If you need do the calculations, you need to use ROund or DIV 1, after that, when you are presenting the value to the user, you need to use FORMAT or DecimalPlaces...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.