Display Negative numbers

Hi,
I am using JDeveloper 11.1.1.5
One of an ADF page is expected to display negative number and also follow the number format pattern as shown below. I am not able to display negative numbers. Can anyone help here please?
Below is my code snippet.
VO.xml ::
     <ViewAttribute
     Name="TotalDue"
     IsUpdateable="false"
     IsPersistent="false"
     PrecisionRule="true"
     Precision="15"
     Scale="2"
     Type="java.math.BigDecimal"
     ColumnType="NUMBER"
     AliasName="NET_DUE_INVESTOR"
     Expression="NET_DUE_INVESTOR"
     SQLType="NUMERIC">
     <DesignTime>
     <Attr Name="_DisplaySize" Value="22"/>
     </DesignTime>
     <Properties>
     <SchemaBasedProperties>
          <LABEL
          ResId="NET_DUE_TOFROM_INVESTOR"/>
          <FMT_FORMATTER
          ResId="com.ahmsi.isams.liquidation.model.vo.Liquidation332FormView.TotalDue_FMT_FORMATTER"/>
          <FMT_FORMAT
          ResId="com.ahmsi.isams.liquidation.model.vo.Liquidation332FormView.TotalDue_FMT_FORMAT"/>
     </SchemaBasedProperties>
     </Properties>
     </ViewAttribute>
ModelBundleProperties ::
     TotalDue_FMT_FORMATTER=oracle.jbo.format.DefaultNumberFormatter
     TotalDue_FMT_FORMAT=\#,\#\#\#,\#\#\#,\#\#\#,\#\#0.00;(\#,\#\#\#,\#\#\#,\#\#\#,\#\#0.00)
myjsfpage.jsf ::
     <af:outputText value="#{bindings.TotalDue.inputValue}"
          id="ot5141" inlineStyle="font-weight:bold;">
     <af:convertNumber groupingUsed="false"
               pattern="#{bindings.TotalDue.format}"/>
     </af:outputText>

Got it correct now. I changed the pattern as below. Also added a nowrap=true on the output text
ModelBundleProperties ::
TotalDue_FMT_FORMATTER=oracle.jbo.format.DefaultNumberFormatter
TotalDue_FMT_FORMAT=\#,\#\#\#,\#\#\#,\#\#\#,\#\#0.00;-\#,\#\#\#,\#\#\#,\#\#\#,\#\#0.00
Thank you all for your directions.
Thanks,
Prashant

Similar Messages

  • Displaying negative numbers in brackets in Excel output

    Hello all.
    I have an RTF template...I tired displaying negative numbers in brackets like : (123.80) in Excel output
    But, this is working in PDF and not in Excel.
    Please let me know the way to dsiplay the numbers in brackets.

    varma wrote:
    Negative numbers in bracket
    add a conditional statement like below.
    <?if: NUMBER_TO_CHECK < 0?> <?concat('(',NUMBER_TO_CHECK,')')?><?end if?>
    <?if: NUMBER_TO_CHECK > 0?> <?NUMBER_TO_CHECK?><?end if?>
    are you using the same template for PDF and EXCEL ?
    if so, it has to be handled little differently.
    Place this line in the beginning of the rtf
    <?param@begin:_xf;''?>
    add this condition on number column for Excel output
    <?if:$_xf='excel' and NUMBER_TO_CHECK < 0?> <?concat('(',NUMBER_TO_CHECK,')')?><?end if?>
    Try the above one it should work.
    Have a Nice dayThis didnt work.
    Say that I have element named 'market'
    I placed this condiion <?param@begin:_xf;''?> at the beginningof RTF
    Replaced the number field with this condition: <?if:$_xf='excel' and market< 0?> <?concat('(',market,')')?><?end if?>
    This is giving me a blank output in place of the number.
    >

  • Wi-Fi Connection Time Displays Negative Numbers

    Using an AEBS with the latest firmware 7.6.2 and OS X 10.7.2.  The Wi-Fi connection time appears to randomly start displaying negative numbers. It then counts down (up?) to zero and then displays positive numbers. Anyone else seen this?
    Regards.

    I have the same problem (Macbook 2008, 10.6.8 airport extreme 7.6). Has there been a fix? How do I report this bug, which seems to be affecting older machines as well? It's somewhat amusing, but is starting to become annoying.
    Melinda

  • Displaying negative numbers under certain conditions

    I have a Crystal Report which I am developing and need to display positive numbers as negative, but only under certain conditions.  I did not see anything on this type of questions so I decided to join and post it up myself.  This is a transfer report so if the location number entered in the parameter list is the SHIPPING location, I need to display retail, cost, and totals as negative.  Here is the formula which I came up with for ext cost, but it is returning all zeros.  I cannot seperate the to and from locations in the parameters because this report needs to display both in and out of that location.
    if totext({?loc}) = totext({Command.SHIP_FROM}) then ({Command.EXT_COST}*-1)
    Any suggestions?  Appreciate the help!

    Hi Jon,
    If it returns zeroes, then it means that this part of the code fails:
    totext({?loc}) = totext({Command.SHIP_FROM})
    Do you have records where the value entered in the 'loc' prompt matches with records in the SHIP_FROM column on the report?
    See if this helps:
    if totext({?loc},0,"") = totext({Command.SHIP_FROM},0,"") then ({Command.EXT_COST}*-1)
    -Abhilash

  • My WiFi signal is displaying negative numbers instead of signal strength.

    Recently my Ipod 3rd gen. has been getting real weird with the wifi. first, it would always lose signal whenever i would do anything, like watch videos or open an app that required wifi. if i moved a couple feet it'd start to connect again. Then it started displaying a "-87" where the wifi signal would be. and the number would either increase or decresase, until i tried doing something that requird wifi. at first it would only come on whenever i restarted my ipod and itd quickly lose signal. ive restorede my ipod 3 times today, dumped everything. ive tried jailbreaking it to see if itd refresh files or anything. im not sure what to do anymore. ive looked for hours online and cant seem to find anyone with this problem. Any suggestions or ideas? without me buying a new one. i don't have a warranty..
    Message was edited by: jbiggie1130

    Interesting. The -87 refers to signal strength in db, which I believe are decibels. The lower the number, the stronger the signal.
    However, iPods don't display these numbers unless you have jailbroken the device or are using an app like WiFinder (since removed from the App Store).
    And since you have jailbroken the device we can't, by the terms of service of this site, offer you any advice other than to refer you to help article on WiFi: http://support.apple.com/kb/TS1398

  • Results don't display negative numbers

    I have an application that accepts a 24 bit number and does some simple mathematical operations (see attached).  If number 3(a probe) receives a number lower than the constant that is being subtracted from it, which should result in a negative number, number 6(probe) displays a much larger, positive integer.
    I'm sure that I must be missing something simple somewhere.
    I thank you for your help in advance.
    Ron Deavers, CLD
    Attachments:
    NumberError.bmp ‏114 KB

    Thank you very much. I didn't realize the difference between unsigned integer and integer.
    Ron Deavers, CLD

  • How do I disallow negative numbers in a selected group of cells (i.e. only allow values greater than or equal to zero)?

    I have a table of calculated values in Numbers, and I want to disallow negative numbers in the entire table. Any numbers that would be negative I would like changed to/displayed as zeroes, that way future calculations that may be based on this cell use the value of 0 for the calculation rather than the negative value. I have seen ways of doing this to single cells at a time, but I am interested in applying it to a large selection of cells.
    There is the Conditional Format option when you bring up the inspector, but I cannot get a custom rule to work for me. I select "Greater than or equal to" and I enter 0 in the box, but nothing changes. Can anyone help with this?
    Thanks

    A step toward simplifying the application of MAX to the issue, Jerry.
    This part, though:
    Now apply your long, animal-modeling, expressions to this new, interposing, table rather than the original.
    may still leave several references to be change from the original data table to the new one.
    One way to get around that is to use the Duplicate ("DATA-1) as the new table for raw data, and the Original (DATA) as the interposing table, using the formula =MAX(DATA-1::A2) as above, starting in DATA::A2.
    This way, the long expressions could continue to reference the original table (with its content now modified).
    ALTERNATE process:
    Find/Replace could also be used to speed the process of reassigning the modeling expressions to the duplicate table, as suggested by Jerry. But some cautions apply here.
    Find/Replace can be limited to Formulas only, but not to Some formulas only.
    Find/Replace can be limited to the Current Sheet only, but this can't be combined with Formulas only.
    More on this later, when I've had a chance to check some possibilities.
    Regards,
    Barry

  • Negative numbers in Parentheses() in Interactive Reports in Apex 4.1

    Hi,
    I want to display the negative numbers in parentheses() in all the interactive reports in my application eg: (367,432,203.07).
    I tried using the PR format "999G999G999G999G990D00PR" in my number/date format option in 'Column Definition'. But it gives the negative number '-367432203.06895' like this '<367,432,203.07>', which is not my exact requirement.
    Is there any other number format/option to get negative numbers in parentheses in my reports.
    Can anyone please help me on this?

    divya wrote:
    I want to display the negative numbers in parentheses() in all the interactive reports in my application eg: (367,432,203.07).
    I tried using the PR format "999G999G999G999G990D00PR" in my number/date format option in 'Column Definition'. But it gives the negative number '-367432203.06895' like this '<367,432,203.07>', which is not my exact requirement.
    Is there any other number format/option to get negative numbers in parentheses in my reports.No. In 4.1 the only way to do this that preserves IR sort/aggregation/calculation functionality is to manipulate the values using a Dynamic Action/JavaScript after the page is rendered. This is not really satisfactory.
    In 4.2 I think it might be possible using a lot of extra columns, HTML Expressions, and CSS.

  • Uni project methods & negative numbers arrghhh

    Hi there i have written a program for uni it creates a random number & gives the user 3 guesses at getting the number before giving them a message saying they have lost and revealing the actual number. So far so good . I managed to get this working but the next part of the project requires me to use a method which gives the user a message giving them a hint. The hint tells them whether they are hot, warm, cold etc.
    I have tried to implement this in my program using this code but its not working im getting 3 messages like
    ERROR: 'class' or 'interface expected
    Also i think my use of negative numbers is wrong i can remember someone telling me you have to change the negative number into a positive before u can manipulate it or something like that.
    Anyway any help would be greatly appreciated.
    import javax.swing.*;
    import java.util.*;
    public class Coursework1{
         public static void main(String args[]){
              int randomnumber,usersguessint,checkguess,guessvalid,attempts;
              String usersguess,output,close;
              boolean match;
              //create random number generator
              Random numGenerator = new Random();
              //generate a random number between 1 & 10 inclusive
              randomnumber = Math.abs(numGenerator.nextInt(9))+1;
                   //ask user for his first guess
                   usersguess=JOptionPane.showInputDialog("Please enter your guess between 1 & 10");
                   //convert users guess to integer
                   usersguessint = Integer.parseInt(usersguess);
                        //initialize variable attempts
                        for ( attempts = 0; attempts < 2; attempts++ ) {
                        //validate input
                        while (usersguessint<1||usersguessint>10){
                        usersguess=JOptionPane.showInputDialog("You entered an incorrect number \nPlease enter a numberbetween 1 & 10");
                         //convert users guess to integer
                        usersguessint = Integer.parseInt(usersguess);
                        } //end while loop
                             //call boolean method
                             match = checkGuess(usersguessint, randomnumber);
                             if (match==true){
                             //display text area in JoptionPane
                             output="You won";
                             JOptionPane.showMessageDialog(null,output,"You Won",JOptionPane.INFORMATION_MESSAGE);
                             break;}
                             else{
                             //call boolean method
                             close = howClose( usersguessint, randomnumber);
                             output="You were"+close;
                             JOptionPane.showMessageDialog(null,output,"hint",JOptionPane.INFORMATION_MESSAGE);
                             output="Try again";     
                             usersguess=JOptionPane.showInputDialog("Try again");
                             usersguessint = Integer.parseInt(usersguess);
                                  }     //end if
                   } //end for
              }//end main
                             //user defined method (chechguess)
                             public static boolean checkGuess(int usersguessint,int randomnumber){
                             boolean match = false;
                             if (usersguessint == randomnumber){
                             match = true;
                             return match;
                             }//end method
                             //user defined method (howClose)
                             public static String howClose(int usersguessint,int randomnumber){
                             String close
                             int difference;
                             difference = randomnumber-userguessint
                             if((difference<2)&&(difference>-2)){
                                  if((difference<3)&&(difference>-3)){
                                       if((difference<4)&&(difference>-4)){
                                            close="cold";
                                       }//end if
                                  else{
                                       close="warm";
                                  }//end if     
                             else{
                                  close="hot";
                             return close;     
                             }//end method
         }//endclass

    Yep, faulty as designed.
    try this:public static String howClose(int usersguessint, int randomnumber) {
              int difference;
              difference = randomnumber - usersguessint; // <---
              if ((difference < 2) && (difference > -2)) {
                   return "hot";
              if ((difference < 3) && (difference > -3)) {
                   return "warm";
              return "cold";
         }// end method

  • How to display page numbers in report

    hi all,
    i would like to know how to display page numbers in this format " 1 of 5" in the report.
    Any help would be much appreciated.
    thanks
    seema

    Hi,
    Check this too...
    Page No. in ALV output
    If you query is solved, kindly close the thread.
    Regards,
    Anjali
    Message was edited by: Anjali Devi Vishwanathan

  • Is anyone having trouble using parenthesis to show negative numbers in excel after upgrading to Yosemite?

    Since upgrading to Yosemite, I can no longer reflect negative numbers with parenthesis using excel.  All of my existing spreadsheets also no longer show parenthesis, creating formatting problems.  Is anyone else experiencing this and is there a solution?

    I suggest you post your question to Microsofts own forums for their Mac software as it's their product you're having issues with
    http://answers.microsoft.com/en-us/mac

  • How to display Page numbers in XMLreport(on PDF)

    hi all,
    we have a requirement where we need to display page numbers(e.g.page 1 of 10),on an XML report.
    can anybody suggest me the solution.

    Hi,
    Check this too...
    Page No. in ALV output
    If you query is solved, kindly close the thread.
    Regards,
    Anjali
    Message was edited by: Anjali Devi Vishwanathan

  • Help with display of numbers

    First of all I have to say the tutorials on this site are extremely helpful. My instructor wants all our java code written as Object Oriented and when I did a search on here for Object Oriented it totally helped out. Now I just need help with the display of numbers, my code works perfectly fine except that the number has wayyyyyyyyyyy to many decimal points after it. I only wanted two.
    public class Mortgage
         double mtgAmount;
         double mtgTerm;
         double mtgRate;
         double monthPymt;
              public void Amount(double newValue)
                     mtgAmount = newValue;
              public double Amount()
                   return mtgAmount;
              public void Term(double newValue)
                     mtgTerm = newValue;
              public double Term()
                   return mtgTerm;
              public void Rate(double newValue)
                     mtgRate = newValue;
              public double Rate()
                   return mtgRate;
              public void calcmonthPymt(double newValue)                            //(LoanAmt * Rate) / (1- Math.pow(1+Rate,-Term));
                     monthPymt = (newValue);
              public void display()
              System.out.println ("The Mortgage Amount is:" +(Amount( ) * Rate( )) / (1- Math.pow(1+Rate( ),-Term( ))));
         public static void main (String[] args)
                     Mortgage Mortgage1=new Mortgage();
                     Mortgage1.Amount(200000);
                     Mortgage1.Term(360);
                     Mortgage1.Rate(.0575);
                     Mortgage1.display();
    }

    I figured it out, the math is wrong I think but I got everything to display correctly
    import java.io.*;
    import java.text.*;
    import java.text.DecimalFormat;
    public class Mortgage
         double mtgAmount;
         double mtgTerm;
         double mtgRate;
         double monthPymt;
         DecimalFormat money = new DecimalFormat("$0.00");
              public void Amount(double newValue)
                     mtgAmount = newValue;
              public double Amount()
                   return mtgAmount;
              public void Term(double newValue)
                     mtgTerm = newValue;
              public double Term()
                   return mtgTerm;
              public void Rate(double newValue)
                     mtgRate = newValue;
              public double Rate()
                   return mtgRate;
              public void calcmonthPymt(double newValue)                            //(LoanAmt * Rate) / (1- Math.pow(1+Rate,-Term));
                     monthPymt = (newValue);
              public void display()
              monthPymt = (Amount( ) * Rate( )) / (1- Math.pow(1+Rate( ),-Term( )));
              System.out.printf("The payment amount is:$%.2f", monthPymt);
              System.out.println();
         public static void main (String[] args)
                     Mortgage Mortgage1=new Mortgage();
                     Mortgage1.Amount(200000);
                     Mortgage1.Term(360);
                     Mortgage1.Rate(.0575);
                     Mortgage1.display();
    }

  • Negative numbers in export to excel

    Hi,
    We have two servers, one (X) without SP1 and the other (Y) with SP1.
    When I make export to excel in X, the negative numbers sometimes saved as @ or the actual negative number (e.g. -42), in both cases it is saved as text.
    The positive numbers are saved as numbers.
    We saw that SAP fixed it in SP1, we tried it on Y, we got that the negative numbers always show (e.g. -42), but all the numbers, positive and negative are saved as text.
    We need to see all the actual numbers(without @), and to be saved as numbers (so we can make calculations on them).
    Does anyone have any idea?
    Thanks.

    I am on SP1 and noticed that sometimes they are saved as numbers and some are texts:
    So I am not sure of any logic or what is going on.
    Maybe as a work around you could format everything to numbers so you can do the calculation?

  • Displaying line numbers in oracle Sql developer

    hi guys, can someone tell me how to display line numbers in oracle sql developer Version 2.1.1.64?.

    I absolutely didn't know where it was, so I had to look for it, and it appears easy to find.
    Hit Tools
    Hit Preferences
    Expand Code Editor
    Navigate to line gutter
    Now click 'Show line numbers'
    And, oh yes, there is a separate sql developer forum. Please keep sql developer issues in that forum.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • Lion Server VPN: Static IPs to Clients?

    Does anyone have any thoughts as to whether it might be possible to have the Lion L2TP server hand out static IPs to clients when they connect, based on the username they use to log in? Looking at this snippet from /Library/Preferences/SystemConfigur

  • Is it possible to convert a PDF without uploading the file (i.e. by entering a URL)?

    My work-issued laptop doesn't allow me to upload files so it possible to convert a PDF file to Word bu just entering the URL of the document.I have a feeling this used to be feasible, Thanks

  • Result List for Premise different for same BP

    Hi SAP experts, We are facing the following issue in our system, When we confirm a BP in our system we get two connection object againt the confirmed BP When we search for premise from the search option for the same BP : We get 3 connection object in

  • I'm sure this is simple--

    I just updated to OS X Mavericks and my old version of MS Word won't work. Is there a plug in or something that will fix this?!

  • Noise waking from sleep

    is it normal for the dvd drive to make a noise when waking up from sleep?