Home » Developer & Programmer » Forms » how to display decimal numbers in text items (Forms 12c)
how to display decimal numbers in text items [message #679847] Tue, 07 April 2020 05:58 Go to next message
calacausi
Messages: 23
Registered: March 2012
Junior Member
I should display a decimal numeric value into a pure text item (data type: char, no format mask).
everything seems to work if item is not bound to database; but, if text item is bound to a numeric DB field, leading zero is trimmed!
ie: if DB value is 0,123456789, it is rendered as ",123456789".
this is awful! how can I fix this bug? Setting data type as Number, or using format mask would force me to a given format (ie: truncate decimal digits to a given quantity).
Again, note that if my text item is not bound to DB, number is displayed correctly.
Re: how to display decimal numbers in text items [message #679848 is a reply to message #679847] Tue, 07 April 2020 06:21 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
what datatype is the DB column that goes with that item?
Re: how to display decimal numbers in text items [message #679849 is a reply to message #679848] Tue, 07 April 2020 07:18 Go to previous messageGo to next message
calacausi
Messages: 23
Registered: March 2012
Junior Member
cookiemonster wrote on Tue, 07 April 2020 13:21
what datatype is the DB column that goes with that item?
it's NUMBER(20,10).
note that values are correctly stored in DB (eg: 0,00123456789)

[Updated on: Tue, 07 April 2020 07:20]

Report message to a moderator

Re: how to display decimal numbers in text items [message #679850 is a reply to message #679849] Tue, 07 April 2020 07:40 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
So why don't you make it a number and set it to accept ten decimals places?
Re: how to display decimal numbers in text items [message #679852 is a reply to message #679850] Tue, 07 April 2020 09:21 Go to previous message
calacausi
Messages: 23
Registered: March 2012
Junior Member
cookiemonster wrote on Tue, 07 April 2020 14:40
So why don't you make it a number and set it to accept ten decimals places?
Im trying several ways, unsuccessfully.
In my item property palette, I put Data Type = Char, Number, Long, RNumber... getting the same output.
If text item isnt bound to DB field, value is display correctly (0,0012...).
If text item is bound to DB field, leading zero is trimmed (,0012...).
How can I set text item to accept decimal places?
Previous Topic: forms 11 g urdu language data view problem
Next Topic: Text to speech in oracle forms 10g
Goto Forum:
  


Current Time: Thu Mar 28 18:49:02 CDT 2024