Decimal places displayed on forms & reports

eYe
Member Posts: 169
I have a requirement that the amount of decimal places that should be displayed on forms and reports should be set.
On forms you can use the DECIMALPLACESMIN property on controls, but not on reports.
What I can do is put the decimal value in a string, determine the amount of decimal places and round or add zero's as required. But is there no quicker way?
On forms you can use the DECIMALPLACESMIN property on controls, but not on reports.
What I can do is put the decimal value in a string, determine the amount of decimal places and round or add zero's as required. But is there no quicker way?
Kind Regards,
Ewald Venter
Ewald Venter
0
Answers
-
There is a field-property "DecimalPlaces". Check that one. E.g. 2:2 always shows 2 decimals.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Are you sure it's Navision? Both on forms and reports there is a DecimalPlaces property on controls and no such thing as DecimalPlacesMin.0
-
AFAIK you can use the property "DecimalPlaces" on a textbox control.
What you should put into it (examples):
1
A minimum of 1 and a maximum of 1 decimal place
1:4
A minimum of 1 and a maximum of 4 decimal places
2:
At least 2 decimal places
:2
No more than 2 decimal places0 -
I know of the decimalplaces property, the problem is that the amount of decimal places is variable.
And yes, it is Navision.
On your forms, give a textbox a name, you go to your symbol menu (F5), goto CurrForm, controls, choose your control, press Ctrl+(right arrow). This will give you something like this: CurrForm."txtBox".DECIMALPLACESMIN
OK, technically it's a function not a property, sorry.
Using this, you can set the decimal places to show in code.Kind Regards,
Ewald Venter0 -
Ahhh..
Thanks!
FORMAT(2.233,0 ,'<Precision,5:5><Standard Format,0>')
will give: 2.23300Kind Regards,
Ewald Venter0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions