Require a Number Format Mask to show leading zeros on decimals

Hi,
My users are complaining about the decimal point not being very clear when fractional numbers are shown. I need a format mask to show a leading zero for numbers between 0 and 1 (eg. 0.5) but not have a trailing point after whole integers.
by example:
10 should show "10"
.5 should show "0.5"
I have tried the following
FM99990D99 which displays as
10 as "10."
.5 as "0.5"
The whole integer of 10 then gets a trailing decimal point. Very ugly as the decimal is the exception to the rule which is why I need to highlight it.
The user do not want a forced decimal place either as follows:
FM999990D09
10 as "10.0"
0.5 as "0.5"
The trailing decimal place is not a practical solution because 99% of numbers are whole numbers and the decimal just pollutes the screen with more zeros, making the numbers harder to read, resulting in more errors.
I am looking for a format mask that shows:
10 as "10"
.5 as "0.5"
I am using Oracle Forms which means I cannot set_item_instance_property for the records which have decimals. I need a single format mask for all options...
Any help would be appreciated.
Thanks,
Tim.

Thanks Francois.
Looks like there is not a simple solution using a format mask alone.
I have implemented a very similar solution to your suggestion. I have a character, non-base table field which I populate and dynamically set a format mask if the value is between -1 and 1 (and not zero).
i.e.
if :purchase.qty > -1 and
:purchase.qty < 1 and
:purchase.qty != 0
then
:purchase.qty__dsp := to_char(:purchase.qty,'FM999999990D99');
else
:purchase.qty__dsp := to_char(:purchase.qty);
end if;
Thanks,
Tim.

Similar Messages

  • Need to show leading zeros in the number field when printed from RDF

    We have a requirement to show leading zeros in the rdf output.
    We cannot use a format mask to achieve the same as the length of the field is not fixed.
    for ex if we have 0.68 then the same is printed in RDF as .68
    we cannot use a format mask as the length of the field is not fixed.
    we need to
    Kindly suggest if any solution exists for the same.

    the numbers after the decima can be anything..
    it can range between 2 to 10 or more...
    as told by you if we put the format as to_char(.68,'90.99') it shall give 0.68 but what for numbers like0.678,0.4567,0.765433 it will display only 2 digits after the decimal...
    The requirement is to dispaly the number as it is ,only the zeroes before the decimal should stay intact..
    we are not able to achieve this in rdf output..
    if it is
    0.678 then 0.678 shld be dispalyed
    0.4567 then 0.4567
    0.765433 then 0.765433
    one format mask shld wrk for all the above..
    we would not be changing the format mask for each number....

  • Portal Form: Number Format Mask Accepted Values

    Hi, i'm trying to format the way numbers are displayed in our forms, specifically instead of 50,000.00 we want 50,000 - without the .00.
    I cannot find anything on format masks in the portal documentation, and the standard oracle masks I have looked up such as "NNNN" etc don't seem to be supported.
    Trial and error has yielded a mask of : 99,999,999 which does get rid of the decimal, but introduces a problem where if the value is smaller than the mask it is shifted into the middle of the field (leading spaces are being added for every missing unit that is specified in the mask), but obviously if a smaller mask definition is used then larger numbers appear as ###### which is worse than the leading zero problem.
    Where in the documentation can I find the accepted forms of numerical number format masks for use in portal forms?
    Thanks..

    Let me know if you find a solution to this. I even asked my Oracle instructor and she couldn't tell me how to setup a date format mask. This is what she gave me which doesn't work, but I'm not saying I'm the quickest race car at the track. lol
    "Hi,
    Try the following format mask "("099")""-"099"-"0999. They have an example of this on page 7-12. I'm not sure if OTN may have a listing of any Forms format mask. Search under Forms Developer and see if you find anything.
    Take care,
    L"

  • How to ignore/remove number format mask ?

    Hi
    I have to import some numbers from the excel sheet, and that number has been saved along with the format mask like (9,999.99) (2,000.00,1,500,00,......)
    but that field in my table is a number filed and i have to equal that number with the number that exist in my table
    i have write that relation like
    mytable.filed1=to_number('excel_filed',9,999.000)
    but I does not work
    So what the solution for that
    Thank you

    Double post. See How to remove a number format mask ?

  • Number format mask of text item is not applied

    Hello all,
    I want to format a number like 999G999G999G999G990D00
    Is specify the format mask under source of the item. But it is not applied and I don't understand why.
    See http://apex.oracle.com/pls/otn/f?p=53873:2 for example
    Btw. is it possible to set the format for all numbers in the application at once? I want to have a thousand separator in most cases.
    Message was edited by:
    Jacob_B

    Hello Jacob,
    Btw. is it possible to set the format for all numbers
    in the application at once? I want to have a thousand
    separator in most cases.I am using substitution strings for things like that. You can define some "global" substitution strings on page application definition.
    So you just have to put in the format (999G999G999G999G990D00 ) in there once and give it a name. Let's say NUMBER_THOUSAND.
    Afterwards you can reference it wherever you need the format e.g. this way:
    to_char(10000,'&NUMBER_THOUSAND.').
    This way you just have one place where to change the format model.
    Regards,
    Tine

  • Applying date and number format mask

    I have specified a date format for an attribute and a number format for another attribute of an entity object using Entity Object Editor - Control hints for the attributes.
    The date format is:
    Format type: Simple Date
    Format: dd.MM.yyyy
    The number format is:
    Format type: Currency
    Format: 0,000.00 km
    When using &lt;c:out value="${bindings.MyDate}"&gt;&lt;/c:out&gt; the format mask for the date is applied and it looks good, but when using
    &lt;c:forEach var="Row" items="..."&gt;
    &lt;c:out value="${Row.MyDate}"&gt;&lt;/c:out&gt;
    &lt;/c:forEach&gt;
    the format mask is not applied.
    When it comes to the number format it is not applied no matter what I use.
    I have tried setting the format for the view object attributes as well but the result is the same. How do I make this work?

    Can it have something to do with &lt;html:form&gt; ? Since it works using &lt;c:out value="${bindings.MyDate}"&gt;&lt;/c:out&gt; inside a html:form.

  • APEX cannot accept any other number format mask except 999G999G999G999G990?

    Hi, guys:
    Can anyone help me on this problem? I have a report with a column of number type, but I want to use accounting format mask such as <1234.56>, however. whenever I choose any other format model for this number column, I got the error message as "ORA-01481: invalid number format model", I can only choose Numeric format mask: 999G999G999G999G990
    Anyone could give me a hint on this? I am using APEX 4.1 and Oracle 11G R2. Here is my query for report
    select uh.descr, inv6.userkey, inv6.invno, inv6.amt-pa_temp.Subtotal_Payment over_short_amount
    from
    (select pa6.invoicekey, sum(pa6.amt) Subtotal_Payment
    from payments pa6
    where trunc(pa6.pmtdate)<=to_date(:P55_DP_VPF_PROD_DATE,'DD-MON-YY')
    and pa6.type not in (5)
    and pa6.invoicekey in (select pa5.invoicekey
    from payments pa5
    where trunc(pa5.pmtdate)=to_date(:P55_DP_VPF_PROD_DATE,'DD-MON-YY')
    and pa5.type=2
    group by pa6.invoicekey) pa_temp, invoices inv6, userhdr uh
    where inv6.userkey=uh.userkey
    and pa_temp.invoicekey=inv6.invoicekey
    and pa_temp.Subtotal_Payment<>inv6.amt
    and abs(inv6.amt-pa_temp.Subtotal_Payment)>1000
    order by 1Thanks a lot!
    Sam

    I found the cause. Thanks!

  • Civil Identity Number Format Mask

    Dears,
    I Need to change the Format Mask for the Civil Identity Number In The People Enter And Maintain Form
    Any Idea How Can I Do That ?
    Thanks in Advance.
    BR,

    Thanks. I did an "on submit and before computation" process that did a SQL replace on the page item. The DML process then successfully inserted the value into the database.
    Alex.

  • Number Format Mask error

    If i am providing format mask is 9 and providing value as 5, then i am getting output as " 5", means a white space padded just before the output. so can any body inform me is this a forms 6i bug, or the output is something like this only.
    A white space is padding just before the output for any Format Mask.

    what is the maximum lenght of the value?
    select max(length(MODEBA))
      from POLK_A_CT
    SQL> with POLK_A_CT as
      2  (select '123' MODEBA from dual
      3   union all
      4   select '456' MODEBA from dual
      5   union all
      6   select '0987' MODEBA from dual)
      7  select to_number(MODEBA,'999') MODEBA
      8    from POLK_A_CT;
    ERROR:
    ORA-01722: invalid number
    no rows selected
    SQL> with POLK_A_CT as
      2  (select '123' MODEBA from dual
      3   union all
      4   select '456' MODEBA from dual
      5   union all
      6   select '0987' MODEBA from dual)
      7  select to_number(MODEBA,'099') MODEBA
      8    from POLK_A_CT;
    ERROR:
    ORA-01722: invalid number
    no rows selected
    SQL> with POLK_A_CT as
      2  (select '123' MODEBA from dual
      3   union all
      4   select '456' MODEBA from dual
      5   union all
      6   select '0987' MODEBA from dual)
      7  select lpad(MODEBA,3,'0') MODEBA
      8    from POLK_A_CT;
    MOD
    123
    456
    098
    SQL>

  • Number Format Mask in Forms

    Hi All,
    If I enter 99999 in the form it has to display 99,999.00.
    What is the format Mask that I have to use to make it dispaly in this way.
    Actually I tried 999,999,999.99 but this is leaving empty spaces...and If the number is bigger then It wont display that...
    Please advice.
    Thanks,
    Satish

    Once you have the number format, you can trim the left spaces.
      1* select to_char(99999,'99,999,999,999.00') result from dual
    sql > /
    RESULT
             99,999.00
    sql > select ltrim(to_char(99999,'99,999,999,999.00')) result from dual;
    RESULT
    99,999.00Thanks,
    Rajesh.

  • How to remove a number format mask ?

    I have to import some data form excel sheet. but the number in that sheet have been saveed as the following format mask 1,000.000(2,000.000,1,5000,00) as charchter
    but in may table that field is a number, so how can remove the format mask from the excelsheet?
    Thanks

    846640 wrote:
    I have to import some data form excel sheet. but the number in that sheet have been saveed as the following format mask 1,000.000(2,000.000,1,5000,00) as charchterI am wonder how to apply format mask in excel for the character cell.
    but in may table that field is a number, so how can remove the format mask from the excelsheet?So, while reading from excel how the values is coming in the variable i assume its coming with comma(,) than what happens if you try like below?
    variable_name:=TO_NUMBER(REPLACE(variable_name,',',''));
    -Ammad

  • Solved: Pick Number format mask

    Hello,
    I'm trying to format all my numbers to a specific model:
    999G999G999G999G990D00
    I tried doing it like I did with 'PICK_DATE_FORMAT_MASK', where I define my format under
    "Application Attributes>Definition". I called it PICK_NUMBER_FORMAT_MASK'.
    It didn't work and i got the next error above my report:
    report error:
    ORA-01481: invalid number format model
    I also tried to define an application item with the value: 999G999G999G999G990D00
    but then I get the same error. If I paste my number format in my report column under Number / Date Format then it works perfect. But I can't change the global format of my numbers now.
    Can anyone help me?
    Thanks in advance.
    Regards,
    Oli

    <p>Oli,</p>
    <p>As you already discovered there is no PICK_NUMBER_FORMAT_MASK substitution variable like there is for date pickers. Perhaps this a nice enhancement request. However, there are some workarounds:
    <ul><li>
    <p>For reports, you can use your PICK_NUMBER_FORMAT_MASK if you convert the NUMBER columns into VARCHAR2 columns like this:<BR>
    <p>to_char(number_column,'& PICK_NUMBER_FORMAT_MASK.')</p></li>
    <li><p>Use ApexLib and extend the firefox plugin with your own numeric settings.</p></li>
    <li><p>You can use the user interface defaults (table defaults, column defaults) in the shared components section of your application.</p></li>
    </ul>
    <p>With kind regards,</p>
    <p>Jornica</p>

  • Delimiteddata and number format mask

    Hi,
    I need to export data from my report to a csv format in reports 6i.
    I installed patch 12 so I can use the delimiteddata format.
    This works but I do have problems with the number format.
    I formatted all of the number fields so they appear as desired in the report when running in C/S mode.
    I learned that you can use the number format, date format and cell wrapper variables for delimited and delimiteddata formats.
    These parameters do work with delimited output but they don't when generating delimiteddata.
    Only when I start the reports builder with numberformatmask=something on the command line then the number format given on the command line will be used. but then you cannot change it (even not in the dialog when generating a delimited format) anymore once reports builder is open.
    Is there a solution for this problem or is it fixed in a later patch (I haven't seen anything new in then patch 13 notes).
    Piet

    Hi Pieter,
    This does looks like a Bug. Please contact Oracle Support to assist you in getting the right patch or otherwise.
    Regards
    Oracle Reports Team.

  • Htmldb_item.text - show leading zero

    Hi,
    I've a report build up with the following query:
    select htmldb_item.text(1, to_char(num1, '9990D99'), 5, 5,'style="text-align:center"') num1
    from test1
    union all
    select htmldb_item.display_and_save(1, to_char(sum(num1), '9990D99'),5) num1
    from test1
    There are some numbers shown and at the end the sum of them. If the sum has a leading zero it is shown as 0.25, but for the value in the textfield is only shown 0 with to_char() - formatting, without it is shown .25 . What can I do to show there also 0.25. It seems to ignore my format given in the select.
    Thanks
    chrissy

    They give us this formatting option, and many more, in Numbers '09. My suggestion for your case if you wish to stay with '08 would be to not format the cells as percentage, but to multiply them by 100 to make them a percentage without displaying the percent sign. You could then label the column to clarify the situation.
    Jerry

  • Field format in Excel - losing leading zero

    I have field in query, which is varchar2 in database, but contains only numbers, most of which have leading zeros, i.e. '0123'.
    When the report is viewed as html, pdf, or rtf data is shown correctly, '0123', but when viewed in Excel, the data is '123'.
    Also, I have a column that is simmilar to this one - varchar2 containing only numbers (SSCC if anyone is familiar). This information is 17 characters long, so instead of '38503341002862100' i get '3,85033E+16' in Excel.
    I noticed in both cases that the cell format in Excel is general, instead of text.
    How can this be changed?

    hi arubelj,
    Excel sheet is made specificaly for number calculations.....and each cell which is having data is by default considered as number...and in numbers 0123=123 ,this is the reason why it is not displaying 0 in start..... i had cheched the excel setup options also..... but did not found anything there to change the default column or row type as text....
    Regards
    Ravi

Maybe you are looking for

  • Error when refreshing report in Infoview

    Post Author: Anna-Marie Smith CA Forum: Administration We are running BO XI release 2.  I can run any report in Desktop Intelligence, but when I publish it and try to run it through Infoviewer I get the following error: Connection or SQL sentence err

  • RoboHelp 9 Changing ul to ol

    Can anyone tell me why RoboHelp keeps changing my <ul> tags to <ol> tags when I'm coding in HTML view and switch to Design view? I'm trying to use a specific image for the bulleted list. The image is referenced in css in the page head, not in a separ

  • Display pdf file

    Hello everybody, I need to retrieve a pdf file from an oracle blob field and open it in the browser. I have searched through the forums but can't seem to find a working solution. Any help would be appreciated, Garbo

  • Command tab - window doesn't switch

    I use Command+tab to switch between windows. But many a times the window doesn't switch to, rather I get the options at the toolbar. This is exactly the problem reported here: https://discussions.apple.com/thread/3458920?start=0&tstart=0 How can I re

  • Package name for Toplink generated file

    Is there is way to specify a package name for the java file generated when you export a project. Thanks, Rajiv