Displaying Positive/Negative numbers from a formula

I have the following formula that looks similar to this..
(Field1) - (Field2)
when field 1 is smaller then field 2 we know that the number will be a negative and the report will print a negative sign in front of the number.
Now here is the question, say (Field1) was equal to 10, and (Field2) was equal to 9 the formula would look like
(10) - (9)
and the report would print a positive 1.   Is there anyway to format the formula to display a Positive sign in front of the number if it is positive, and a negative in front of the number if it is negative?
Thanks everyone for your help!

Yes, that formula works for me.  I had to slightly modify the formula because it was printing two negative signs on ther report instead of one.  I think that may have been due to how I had my number formatting options set in Crystal.
Here is the original formula:
numbervar a:=0;
a:=(Field1)-(Field2);
if a >= 0 then
"+" & (a) else " -" & (a);
Then I changed it to be:
numbervar a:=0;
a:=({@JM_ClaimAmt})-({Reconciliation_GetReport;1.UPCClaimAmt});
if a >= 0 then
// Took out the negative sign here so it would not show negative twice.
"+" & (a) else " " & (a);
It works now, I'm happy

Similar Messages

  • How to display incoming caller numbers from india

    I live in US. When some one calls from india, No caller ID is displayed on iphone. How to see the number. I already verified that the callers did not blocked their numbers from being visible.

    I am using att. The number gets displayed on other att phones but not on iphone. This makes me believe that it should be problem with iphone.!

  • CAS fails when subtracting negative numbers from stack

    The CAS fails to subtract negative numbers. Here is how to reproduce such errors:1) generate a negative number from any operation1 - 22) subtract any number from this previous result2.1) enter any value12.2) press the subtract key, select the previous value from the stack, and copy it- (touch the previous "-1" which results from "1 - 2") (touch "copy")2.3) press ENTER Other variation:cos(-π)*ENTER*, results in -11 --1*ENTER* The issue is negative numbers are being preceded by a subtraction sign instead of a negative sign, and both are treated differently by the software. The bug does not occur in home mode.

    Hello, Maké, Thank you! My report is that of a bug, not a device misuse. Particularly, a(nother) CAS bug. HP Prime's CAS is substituting binary subtraction signs for negative signs when printing results. Entering -1 in Home yedls -1, while in CAS one gets −1. See: the lengh of the dash symbol is different. Kind regards.

  • Oarcle Lite cannot subtract negative numbers from date

    Hello
    we have a very strange problem. We have a query that need to convert times between different timezones. So, we have
    In Oracle lite, the query
    select sysdate - (-60/1440) nd from dual returns sysdate + 2 - 60/1440.
    Whenever a negative fraction is subtracted from date, it always adds two days and then adds the fraction. Looks like negative of a negative fraction is not handled correctly in oracle lite.
    Did anyone encounter this problem? We have the system in production and wondering if anyone found a solution.
    Thanks

    HI sd,
    I suspect there's a simpler way, but this works, as seen in the example. Start and finish times are both incremented by one day as the data and formula are filled down the columns to show the effect of crossing the weekend days. Formula (as it appears in row 7) is shown above the table. The Row 2 version is copied below. Cels in column D are formatted as shown in the Inspector.
    D2: =NETWORKDAYS(B2,C2,)+DURATION(,,24*(DUR2DAYS(C2-B2)-INT(DUR2DAYS(C2-B2))),,,)
    Regards,
    Barry

  • Display Showing Negative Colors From Mini?

    I helped my mom buy a Mini a few years ago... 1.25 GHz PPC G4. Anyway, she has started to have LCD display issues where colors are reversed like photo negatives, such as she describes that the screen is mostly orange, icons are black, and email windows are black with white lettering.
    She did not run any software updates, move the Mini, unhook the LCD, etc. After this started, I did have her hook up to another LCD she has and it looks the same there. I don't know much about the internals of a Mini, but can I assume the video card is toast?
    Thanks for any suggestions!

    have her press control option command 8, it's an universal access feature.
    http://support.apple.com/kb/HT3488

  • 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.

  • 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

  • A better way to differentiate positive vs. negative numbers and sum them ?

    Hi, I wonder if there is a better or easier way to differentiate the positive numbers from negative ones and sum them respectively?
    I come up with below:
    create table t1 (num number, id varchar2(3));
    insert into t1 values  (-100, 1);
    insert into t1 values (50, 2);
    insert into t1 values  (-10, 3);
    insert into t1 values  (-20, 4);
    insert into t1 values  (50, 5);
    insert into t1 values  (60, 6);
    select sum(decode(sign(num), 1, num, 0)) plus, sum(decode (sign(num), -1, num, 0)) minu from t1;
    PLUS   MINU
    160     -130Any suggestion would be appreciated! Thanks

    if there is a better or easier way to differentiate the positive numbers from negative ones and sum them respectively?Maybe you want them in different rows than in different columns:
    SQL> select sign(num), sum(num) from t1 group by sign(num)
    SIGN(NUM)   SUM(NUM)
             1        160
            -1       -130
    2 rows selected.?

  • 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

  • How to know if there are more positive or negative numbers?

    I will try to explain my problem with an example, since in the computer I don't have labVIEW installed.
    I have 10 numbers and multiply it for 10 other numbers
    and of course i will have 10 results, after it I have to show the meddium value of this 10 results and have to show the signal that most appear (+ or -)
    My problem is to show the signal, if I have 7 negative numbers and 3 positive numbers, how can I measure it and show the negative signal in the final?
    example:
    -0,3 -0,8 1 0,3 0,6 -0,7 -0,1 -0,5 0,3 -0,4
    So i have to put in the final:
    - 0,5
    Thanks
    Solved!
    Go to Solution.

    Here is code that gives you -0.5 from the given data. Still, sounds pretty useless.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    minuszeropointfive.png ‏2 KB

  • What formula in numbers can I use when I want to know how much 19 % is of the numbers from (let's say) e6 up to e27 ?  thank you

    what formula in numbers can I use when I want to know how much 19 % is of the numbers from (let's say) e6 up to e27 ?  thank you

    thanks a lot jerry.
    Can I ask you another question?
    it works well but it gives me a number like  14,567
    and I would like it if it will automatic round up an give me the number 15 in this case.
    I do know the seperate folmula to round up numbers but can I combine the two formula's ?
    thank you and bye bye

  • 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.
    >

  • 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

  • Cannot display more than 16 significant digit numbers from Oracle

    The WebI Report cannot display more than 16 significant digit numbers from an Oracle data type field.
    This occurs for both an ODBC and native driver connection to Oracle.
    The data is defined by Number Data Type in Oracle, and view correctly in Universe, but display incorrectly in WebI report which created by InfoView.
    I know BOE XIR2 has this behavior, but it seems that XI3.0 and XI3.1 also have this problem.
    If this behavior in XI3.0 and XI3.1 perform by design? or it's a bug? and Why?
    Thanks!

    Hi Sarah,
    Precision limitation of a Web Intelligence filter constant :
    In an Oracle database, a Number field type can store up to 38 digits. When creating a Web Intelligence report in the Java Panel, a condition is specified for this field (that is represented in the universe as a number), and a constant number is entered for its value, only up to 15 digits of precision are retained.
    For example, if 1234567890123456789 is entered, the value becomes 1234567890123460000.
    Or, if you have a column in database which has a number like 123.123456789012345678 it will display only 123.123456789012.
    Cause
    The reason for this limitation is that Java Panel represents a number internally as a Double field type with only 15 digits precision. This is by design.
    Resolution
    The only workaround is to change the field type to a Character field; however, doing so means losing the ability to perform calculations and/or sorting on the field.
    This issue has been raised as an Enhancement Request and given Track ID # ADAPT00908702.
    Regards,
    Deepti Bajpai

  • How can I stop photos from displaying as negatives?

    I am unable to change the resolution of photos in my iPod touch.
    All photos display as negatives.
    How do I access settings to change the way photos are displayed?

    "Settings" refers to the Settings App which is on the Home App screen. Start the Settings App by touching it
    General is a category of Settings which you then select. The same goes for Accessibility and then White on black which are subcategories.

Maybe you are looking for