Need help with formula in FR 9.3.1

I am trying to recreate this excel formula for a % change in a balance sheet report. Column A in my report is equal to C37 in the formula and Column C in my report is equal to E37 in the formula. I want it to work for the whole column. Any help would be greatly appreciated,
Thanks, Donna
=IF(E37=0,0,IF(ABS((C37/E37)-1)>5,"",(C37/E37-1)))

Also I should say the VariancePercent function gets me the correct number if I use
VariancePercent([a],[c])
but not the right sign.

Similar Messages

  • Need Help with Formula using SQL maybe

    I need help!  I work with Crystal reports XI and usually manage just fine with the Formula editor but his one I think will require some SQL and I am not good at that.
    We are running SQL 2000 I think (Enterprise Manager 8.0)  Our sales people schedule activities and enter notes for customer accounts.  Each is stored in a separate table.  I need to find activities that are scheduled 240 days into the future and show the most recent note that goes with the account for which that activity is scheduled.
    The two tables, Activities and History, share the an accountID field in common that links them to the correct customer account.   I want to look at dates in the Startdate.Activities field more than 240 days in the future and show the most recent note from the History table where the accountid's match. I figure my query will contain a join on AccountID.Activities and AccountID.History used with Max(completedate.History) but I do not understand how to word it.
    I would like to perform all this in crystal if possible.  I humbly request your help.
    Membery

    You SQL would look something like this...
    SELECT
    a.AccountID,
    a.BlahBlahBlah, -- Any other fields you want from the Activities table
    h.LastComment
    FROM Activities AS a
    LEFT OUTER JOIN History AS h ON a.AccountID = h.AccountID
    WHERE (a.ActivityDate BETWEEN GetDate() AND DateAdd(dd, 240, GetDate()))
    AND h.HistoryID IN (
         SELECT MAX(HistoryID)
         FROM History
         GROUP BY AccountID)
    This method assumes that the History table has a HistoryID that increments up automatically each time a new comment is added... So a comment made today would always have a higher HistoryID that one made yesterday.
    If I'm wrong and there is no HistoryID or the HistoryID doesn't increment in a chronological fashion, it can still be done but the code is a bit more complex.
    HTH,
    Jason

  • Need Help with Formula

    I am fairly new to Crystal Reports and could use some assistance.  I have built two subreports with formulas to pull information into the main report.  Now I would like to create a total per line based on the two values pulled from subreports, plus another column in the main report (the information is already pulled in).  How can this be done?
    Edited by: JmeAbiday on Jun 4, 2009 3:51 PM

    Sastry,
    The formula is placed in the subreport.
    About the formula being placed in the main report.  I am a little confused. 
    You said place it after the sub report section.  The sub report section on the report includes two columns in the main report (each column coming from a different subreport).  I am trying to make a column to the right of these columns with a line total of the three columns to the left.  So on the design of the main page, I have a formula from the main page in one column, and then the other two columns come from the subreports.
    I guess I don't understand what you mean by placing it after the sub report section, when I am trying to create a line total of the items in the columns.  Can you please elaborate?
    I apologize, I am still new to this!  What I am trying to do:
    Column A (Main Report)  /  Column B (From Subreport1) / Column C (From Subreport 2) /  Total: ABC
    Assume each column has hundreds of rows.
    Thanks again for your assistance!
    JmeAbiday

  • Need help with formula in Numbers for iPad 2

    I have a spreadsheet with a formula such as b2 x c2  very simple.  However, if the formula cells (b2 and 2) are blank then the destination cell contains a zero. How can I make my destination cell b blank while the formula cells are blank? I got thsvresponse from a person working with Mac os x, if this helps...
    I can't seem to make this work in my formula bar on ipad2!
    =if(isblank(<source cell>), "", <What ever your formula is>)
    Thanks for any suggestions!
    iPad 2

    Your friend was close, but forgot one thing. If you want it to be blank if either cell is MT, then you need an OR as well o test if either one or the other is blank...
    =IF(OR(ISBLANK(a1),ISBLANK(b1)),"",a1xb1)
    The isblank can also be represetned by ="" in many cases, usually accompanied with a trim to make sure there are no spaces were entered...
    =IF(OR(TRIM(a1)="",TRIM(b1)="")),"",a1xb1)
    Jason

  • New to OBIEE need help with Formula

    Is it possible to use a prompt in a column formula filter for e.g. FILTER("Defect Facts"."Detected on Date" USING "Defect Facts"."Detected on Date" = '@{11/20/2009 12:00:00 AM}')) this formula does not works for the column. What i need to do is create a filter that will only pull back the date > 11/12/2009 using the formula. Am I doing something wrong? Is there a way to create a filter in the formula and not create a filter for my report? If i create a filter for my report and do a drill down it ignores the date and pull back all defects.
    Thanks for your help
    Edited by: CedricG on Dec 28, 2009 11:37 AM

    Ok my problem may not be the filters. I created a detail drill down for my defects and created a second report with the number of defects. In the second report, I created a table that displays the total number of defects by Product and severity.
    Ex:
    Defect
    Total Defect
    Product S1 - Critical S2 - High S3 - Medium S4 - Low
    RPAS 6 1 2 3
    RMS 7 2 1 3 1
    Grand Total 13 2 2 5 4
    I used Bins to group my products and name them one name.
    Ex:
    1) Product is equal to / is in "RPAS for Merch Financial Planning - 1814", "Extract Tranform and Load - 1803" and named that Bin RPAS
    2) Product is equal to / is in "Merchandising System - 1816", "RMS" and named that Bin RMS
    If i wanted to see what are the 2 defects for RPAS that's a S3-Medium, I would select the 2 but it displays 414 of the defects in my database and not the two taht i'm expecting. I think my problem is I'm passing the "RPAS" to my defect drill product prompt and not the actual value Merch Financial Planning - 1814. Do you knw how to get around this? It works if i dont group them in the Bin.

  • I need help with formulas please. See bottom of 1st table for question. Thanks.

    Regular monthly flows
    Regular Monthly Inflows/Outflows
    Date
    Check #
    Payee/Description
    Category
    Amount
    Day of month due
    02/01/2013
    Deposit
    Dream Job
    Salary
    $          16,000.00
    1
    02/01/2013
    Payment
    State Withholding
    Tax:State
    $          (0.05)
    1
    02/01/2013
    Payment
    Federal Withholding
    Tax:Fed Income
    $          (0.10)
    1
    02/01/2013
    EFT
    Credit Card I
    M/C
    1
    02/01/2013
    EFT
    WaterMain Utilities
    Utilities:Water
    $          (84.71)
    1
    02/03/2013
    EFT
    Dan's Yard & Snow Removal
    Misc
    $          (150.00)
    3
    02/03/2013
    EFT
    Credit Card II
    VISA
    3
    02/05/2013
    EFT
    Hopes & Dreams Bank
    Car Payment
    $          (399.87)
    5
    02/07/2013
    EFT
    Metro Utilities
    Utilities:Electric
    $          (117.00)
    7
    02/08/2013
    EFT
    Out Yo Mind Mortgage
    Mortgage Interest
    $          (165.44)
    8
    02/08/2013
    EFT
    Out Yo Mind Mortgage
    Mortgage Principle
    $          (141.41)
    8
    02/08/2013
    EFT
    Out Yo Mind Mortgage
    Escrow
    $          (250.04)
    8
    02/15/2013
    EFT
    Sprint
    Utilities:Telephone
    $          (80.00)
    15
    02/18/2013
    EFT
    Credit Card III
    American Express
    18
    02/18/2013
    EFT
    Watch Me Cable
    Utilities:Cable
    $          (120.92)
    18
    Formula in column A=DATE(YEAR(NOW()),MONTH(NOW())+1,F19)
    Need formula for yellow filled cells to match the month in column A with the month in
    column A of "CC Payoff Schedule" sheet (ignoring the day of the month) to get the correct payment amount.
    CC Payoff Schedule
    M/C
    VISA
    American Express
    $1,000.00
    Payment
    % of the 3 interests
    Old Balance
    Interest 6th
    New Balance
    Payment
    % of the 3 interests
    Old Balance
    Interest 8th
    New Balance
    Payment
    % of the 3 interests
    Old Balance
    Interest 22nd
    New Balance
    Int/Monthly
    Jan-13
    $500.00
    49.92%
    $4,600.00
    $86.87
    $4,186.87
    $300.00
    27.04%
    $6,380.00
    $47.06
    $6,127.06
    $200.00
    23.04%
    $3,200.00
    $40.09
    $3,040.09
    $174.02
    Feb-13
    $499.19
    48.70%
    $4,186.87
    $79.07
    $3,766.74
    $270.43
    27.84%
    $6,127.06
    $45.19
    $5,901.82
    $230.38
    23.46%
    $3,040.09
    $38.09
    $2,847.80
    $162.35
    Mar-13
    $487.02
    47.31%
    $3,766.74
    $71.13
    $3,350.85
    $278.38
    28.96%
    $5,901.82
    $43.53
    $5,666.98
    $234.60
    23.73%
    $2,847.80
    $35.68
    $2,648.87
    $150.34
    Apr-13
    $473.14
    45.77%
    $3,350.85
    $63.28
    $2,940.99
    $289.55
    30.23%
    $5,666.98
    $41.80
    $5,419.23
    $237.31
    24.00%
    $2,648.87
    $33.19
    $2,444.75
    $138.26
    May-13
    $457.67
    44.03%
    $2,940.99
    $55.54
    $2,538.86
    $302.32
    31.69%
    $5,419.23
    $39.97
    $5,156.88
    $240.01
    24.28%
    $2,444.75
    $30.63
    $2,235.37
    $126.14
    Jun-13
    $440.30
    42.06%
    $2,538.86
    $47.94
    $2,146.51
    $316.89
    33.37%
    $5,156.88
    $38.04
    $4,878.03
    $242.81
    24.57%
    $2,235.37
    $28.00
    $2,020.56
    $113.99
    Jul-13

    LI,
    Regarding the date matching... As I understand it, you want to truncate the date to Month and Year, not considering the Day part of the date. You can do that with this type of expression:
    =MONTH(date) & "-" &YEAR(date)
    The result for January 10, 2013 would be: 1-2013. If you must have the exact format of Jan-13, you could write this somewhat more complicated expression:
    =LEFT(MONTHNAME(MONTH(date)), 3)&"-"&RIGHT(YEAR(date), 2)
    Regards,
    Jerry

  • New to Crystal reports and need help with formula

    Post Author: dausa
    CA Forum: Formula
    I will try to keep this short and sweet.
    Data comes from excel sheet and I am doing a outter left join.
    The need: IF the status is S or N, then i want it to sum the qty required for each part number.
    my formula looks like this;  If ({WIP_ORDER.STATUS}) = 'C OR N' Then SUM ({WIP_ORDER.QUANTITY_REQUIRED}, {ORIGINAL_.PART NUMBER})
    thanks for any help
    dausa

    Post Author: Manuel de Kleine
    CA Forum: Formula
    Dausa,You could use a formula like below:IF  ({WIP_ORDER.STATUS}) IN &#91;'C','N'&#93;THEN 1ELSE 0Now, you can do a SUM on this formula.

  • Need help with formula that puts values in Field1 based on value of field2

    I have two custom fields in the Contact record - Date met and Time Known. Date met is a standard date field that is entered by the user. I then wanted Time Known to automatically populate with specific values based on a formula I wrote. However, the formula/function is not working properly.
    I'm also not sure if this should be a pre or post field formula, field validation, or workflow. Please help! Here's the formula I have so far. It worked for a new record created, but now doesn't work at all for some reason (probably from my testing).
    IIf(Today()-[<dResearch_Date_ITAG>]<365,"Less than One Year",IIf(Today()-[<dResearch_Date_ITAG>]<1095,"One to Three Years", IIf(Today()-[<dResearch_Date_ITAG>]<1825,"Three to Five Years",IIf(Today()-[<dResearch_Date_ITAG>]<3650,"Five to Ten Years","Ten Plus Years"))))
    This says the following:
    If Date Met is less than 365 from today, then enter "Less than One Year" into the Time Known field;
    if date met is less than 1095 (but greater than 365) days from today, then enter "One to Three Years"
    if date met is less than 1825 (but greater than 1095) days from today, then enter "Three to Five Years"
    if date met is less than 3650 (but greater than 1825) days from today, then enter "Five to Ten Years"
    otherwise, enter "Ten Plus Years" for all values greater than 3650.
    What am I doing wrong? I'm new to expressions and formulas in Oracle.

    Hi, You have to do @ 2 places. For setting the field value @ the time of creating a new record using the field default feature. Check post default as the calculated value is dependent on some other field that you are going to set @ the time of creation. For updating the field whenever the record is modified, use workflows
    -- Venky CRMIT

  • Need help with formula to calculate percent of orders $500.

    Have data with salesperson order info.  Am already counting total number of order per salesperson and also counting and summing order count of orders with order$<500.  Can't figure out how to calculate number of orders per salesperson with order $ <$500 as percent of total number of orders per salesperson. Tried just dividing the two numbers, but got results that didn't make sense.

    That is what I think I have tried, but keep getting errors or numbers that don't make sense. I am a new forum user, so don't know if I can actually somehow attach my report parameters to this post or if someone would be willing to call me to discuss.
    When I try this code:
    *Sum ({@@ordercount}, {Orders.szOutsideSPName})  % sum (Count ({Orders.szOutsideSPName}))*
    I get an error message that the (Count ({Orders.szOutsideSPName})) can't be summarized.
    When I try this code:
    Sum ({@@ordercount}, {Orders.szOutsideSPName})  % (Count ({Orders.szOutsideSPName}))
    I don't get error messages and it calculates something, but the numbers are definitely not correct (I check them with the calculator)
    For example,
    salesperson   total # of orders       # of orders<$500    Calculated%
    1                    596                            357                      1.39
    2                    290                            138                       1.40
    3                   1100                            647                      6.58
    I can't even figure out how those % numbers were calculated.

  • Need help with writing a rule

    Need help with some rules. I want to book a number to a specific Entity at a Specific Custom 4 only. I don't want this formula to work at all C4 levels. How can this be done?
    for example if Entity is "XBM1123" and we use C4 for tracking and the tracking level I want to book it to is IMPORT, how can this be done for a specific account 4400221
    I have my formula as
    If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then
    If HS.Entity.Member = "XBM1123" or HS.Custom4.Member = "IMPORT" then
    HS.EXP "A#4400221= A#4521111 + A#3526644 + A#635210"
    End If
    End if
    this did not work. I got hte following error
    Calculate started.<BR>Error executing VBScript Microsoft VBScript runtime
    error, Line 259:Object doesn't support this property or method:
    'HS.Custom4.Member'.<BR>Calculate finished.<BR>Error executing
    VBScript %0.
    I then changed it to the below and it still did not work
    If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then
    If HS.Entity.Member = "XBM1123" then
    HS.EXP "A#4400221.C4#IMPORT= A#4521111 + A#3526644 + A#635210"
    End If
    End if
    error
    Invalid Custom1 member
    specified for this function.
    Invalid Destination specified for this function:
    A#4400221.C4#IMPORT.

    You are close.
    Try:
    If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then
        If HS.Entity.Member = "XBM1123" then
           HS.EXP "A#4400221.C4#IMPORT= A#4521111.C4#IMPORT + A#3526644.C4#IMPORT + A#635210.C4#IMPORT"
        End If
    End if
    or replace IMPORT with with Top_C4 or what ever member you need to copy to C4#IMPORT.
    Rule of thumb, to be on the safe side and for most simple calcs, is if you mention a dimension on the left side, you need to define it on the right side as well.

  • Need help with a currently "in-use" form we want to switch to Adobes hosting service

    Hi, I am in desperate need of help with some issues concerning several forms which we currently use a paid third party (not Adobe) to host and "re-distribute through email"...Somehow I got charged $14.95 for YOUR service, (signed up for a trial, but never used it)..and now I am paying for a year of use of the similar service which Adobe is in control of.  I might want to port my form distribution through Adobe in the hopes of reducing the errors, problems and hassles my customers are experiencing when some of them push our  "submit button". (and I guess I am familiar with these somewhat from reading what IS available in here, and I also know that, Adobe is working to alleviate some of these " submit"  issues, so let's don't start by going backwards, here) I need solutions now for my issues or I can leave it as is, If Adobe's solution will be no better for my end users...
    We used FormsCentral to code these forms and it works for the most part (if the end-user can co-operate, and thats iffy, sometimes), but I need help with how to make it go through your servers (and not the third party folks we use now), Not being cruel or racist here, but your over the phone "support techs" are about horrible & I cannot understand them or work with any of them, so I would definitely need someone who speaks English and can understand the nuances of programming these forms, to please contact me back. (Sorry, but both those attributes will be required to be able to help me, so, no "newbie-interns" or first week trainees are gonna cut it).... If you have anyone who fits the bill on those items and would be willing to help us, please contact me back at your earliest convenience. If we have to communicate here, I will do that & I can submit whatever we need to & to whoever we need to.
    I need to get this right and working for the majority of my users and on any platform and OS.
    You may certainly call me to talk about this, and I have given my number numerous times to your (expletive deleted) time wasting - recording message thingy. So, If it's not available look it up under [email protected]
    (and you will probably get right to me, unlike my and I'm sure most other folks',  "Adobe phone-in experiences")
    Thank You,
    Michael Corman
    VinylCouture
    Phenix City, Alabama  36869

    Well, thanks for writing back...just so you know...I started using Adobe products in 1987, ...yeah...back then...like Illustrator 1 & 9" B&W Macs ...John Warnock's Helvetica's....stuff like that...8.5 x 11 LaserWriters...all that good stuff...I still have some of it working on a mac...much of it was stuff I bought. some stuff I did not...I'm not a big fan of this "cloud" thing Adobe has foisted upon the creatives of the world...which I'm sure you can tell...but the functionality and usefulness of your software can not be disputed, so feel free to do whatever we will continue to pay for, ...I am very impressed with CC PS on the 64 bit PC and perhaps I will end up paying you the stipend that you demand for the other services.
    So  I guess that brings us to our problem.. a few years back and at the height of the recession and near bankruptcy myself,  I was damn lucky and hit on something and began a small arts and crafts supply service to sell my products online to a very "niche market" ...I had a unique product and still sell that product (plus others) online...My website is www.vinylcouture.com...Strange? Yes...but there is a market it seems, for everything now, and this is the market I service...Catagorically, these are 99%+ women that use these "adhesive, sticky backed vinyl products"  to make different "craft items" that are just way too various and numerous to go into... generally older women, women who are computer illiterate for the most part...and all this is irrelevant to my problem, but I want you to have every bit of background on this and especially the demographic we are dealing with, so we can get right to the meat of the problem.
    OK...So about two years ago, I decided to offer a "plain sheet" product of a plain colored "stick back" vinyl... it is available in multiple quantities of packs ( like 5 pieces, 10 pieces, 15 pieces, in a packi  & so on)...and if you are still on my site.. go to any  "GO RIGHT TO OUR ORDER PAGE"  button, scroll down a little...and then to the "PLAIN VINYL" section...you will see the Weebly website order process.) You can back out from here, I think,..but, anyway this product is available in 63 colors + or - a few. So then the problem is,  how do they select their individual colors within that (whatever) pack?... .
    So my initial idea was to enable a "selection form" for these "colors" that would be transmitted to me via email as 'part" of the "order process".. We tried getting our customers to submit a  " a list" ( something my competitiors still do, lol, poor bastards)......but that..is just unbelievable..I can't even begin to tell you what a freakin' nightmare that was...these people cannot even count to 10, much less any higher... figuring out what colors to list and send me... well, lets just say, it wasn't working......I had to figure out a better way...Something had to be done.
    So after thinking this all out,  and yeah...due to my total ignorance, i figured that we could make a form with Live Cycle Designer (Now Forms Central)...(back then something that was bundled with Adobe Acrobat Pro), I believe, and thats what this thing was authored in... and it would be all good...LOL!
    Well not so simple...as you well know, Adobe Acrobat would NOT LET YOU EMAIL anything from itself.....it just wouldn't work (and I know why, and all that hooey), but not being one to take NO for answer,.I started looking for a way to make my little gizmo work.. So I found this company that said they can "hijack" (re-direct actually) the request to email, bypass the wah-wah, and re-transmit it to the proper parties.....for less than $100 a year,  I think...its called http://pdf-fillableforms.com/.
    A nice gentleman named Joseph Silva helped us program the thing to go to his servers and back out. Please dont hassle them...I need them...for now..it basically does work...try it...you should get back a copy of the form that you filled out...good luck however,  if you're on MAC OSX or similar...
    I have included a copy of both of our forms (and feel free to fill it out and play with it)...just put test somewhere on it...(and you must include YOUR email or it will balk)..they are supposed to be mostly identical, except one seems to be twice as large....generating a 1.7 meg file upon submission, while the other one only generates a 600K file or so...thats another issue for another day or maybe you can advise on that also...
    OK so far so good......In our shop, once Grandma buys a 10 pack (or whatever), Only then she gets to the link on her receipt page ro the relevant "selection form" ,(this prevents "Filling and Sending"  with "no order" and "no payment", another early problem we had)... which they can click on and it will usually download and open up on their device if all goes well...Then our little form is supposed to be fillable and is supposed to ADD UP all the quantities, so grandma knows how many she is buying and so forth right on the fly,  and even while she changes her mind..., and IT'S LARGE so grandma can see it, and then it TOTALS it all up for them, ( cause remember, they can NOT add)..,  except there is a programming bug (mouse-click should be a mouse-up probably or something..) which makes you click in the blank spaces to get to a correct TOTAL...about 70-80% of our customers can enable all these features and usually the process completes without problems for them especially on PC's running Windows OS and Acrobat Reader X or XI...at least for most... Unfortunately it is still not the "seamless process" I would like or had envisioned for the other folks out there that do have trouble using our form....  Many folks report to us the following issues that we know of.  First of all it takes too much time to load up...We know its HUGE...is there anyway that you can see, to streamline this thing? I would love for it to be more compact...this really helps on the phones and pads as I'm sure you well know.
    Some just tell us,"it WON'T work"....I believe this is because they are totally out of it and dont even have Adobe Reader on their machine, & don't know how to get it ( yes, we provide the links).....or it's some ancient version....no one can stop this one...
    It almost always generates some kind ( at least one time)  of "error message" which we do warn them about..., telling one,  basically that "Acrobat doesnt even like this happening at all, and it could be detrimental to ones computer files", blah-blah...(this freaks grandma out really bad)...& usually they end up not even trying to send it...  and then I get calls that even you wouldn't believe...& If they DO nut up and push the Red "Submit Form" button, it will usually send the thing to us (and also back to them at the "required email address" they furnished on the form, thats what the folks at the "fillable forms place" do) so, if it's performing it's functions, why it is having to complain?. What are we doing wrong?....and how can I fix it?...Will re-compiling it or saving it as a newer version of "FormsCentral" correct any of these problems ?
    Ok, so that should keep you busy for a minute and we can start out with those problems...but the next thing is, how can I take advantage of YOUR re-direct & hosting services?, And will it get rid of the error messages, and the slowness, and the iOS incompatibilities ? (amazingly,  the last iOS Reader version worked almost OK.. but the newest version doesnt seem to work with my form on my iphone4)  If it will enable any version of the iOS to send my form correctly and more transparently, then it might be worth the money...$14.95 a MONTH you say. hmmmmm...Better be good.
    Another problem is, that I really don't need 5000 forms a month submitted. I think its like 70-100 or less....Got any plans for that?  Maybe I'm just not BIG ENOUGH to use Adobe's services, however in this case, I really don't care whose I do use as long as the product works most correctly for my customers as well as us. Like I said, If I'm doing the best I can, I won't change anything, and still use the other third party, If Adobe has a better solution, then i'm all for that as well. In the meantime, Thanks for any help you can provide on this...
    Michael Corman
    VinylCouture.com
    (706) 326-7911

  • Need help with JTextArea and Scrolling

    import java.awt.*;
    import java.awt.event.*;
    import java.text.DecimalFormat;
    import javax.swing.*;
    public class MORT_RETRY extends JFrame implements ActionListener
    private JPanel keypad;
    private JPanel buttons;
    private JTextField lcdLoanAmt;
    private JTextField lcdInterestRate;
    private JTextField lcdTerm;
    private JTextField lcdMonthlyPmt;
    private JTextArea displayArea;
    private JButton CalculateBtn;
    private JButton ClrBtn;
    private JButton CloseBtn;
    private JButton Amortize;
    private JScrollPane scroll;
    private DecimalFormat calcPattern = new DecimalFormat("$###,###.00");
    private String[] rateTerm = {"", "7years @ 5.35%", "15years @ 5.5%", "30years @ 5.75%"};
    private JComboBox rateTermList;
    double interest[] = {5.35, 5.5, 5.75};
    int term[] = {7, 15, 30};
    double balance, interestAmt, monthlyInterest, monthlyPayment, monPmtInt, monPmtPrin;
    int termInMonths, month, termLoop, monthLoop;
    public MORT_RETRY()
    Container pane = getContentPane();
    lcdLoanAmt = new JTextField();
    lcdMonthlyPmt = new JTextField();
    displayArea = new JTextArea();//DEFINE COMBOBOX AND SCROLL
    rateTermList = new JComboBox(rateTerm);
    scroll = new JScrollPane(displayArea);
    scroll.setSize(600,170);
    scroll.setLocation(150,270);//DEFINE BUTTONS
    CalculateBtn = new JButton("Calculate");
    ClrBtn = new JButton("Clear Fields");
    CloseBtn = new JButton("Close");
    Amortize = new JButton("Amortize");//DEFINE PANEL(S)
    keypad = new JPanel();
    buttons = new JPanel();//DEFINE KEYPAD PANEL LAYOUT
    keypad.setLayout(new GridLayout( 4, 2, 5, 5));//SET CONTROLS ON KEYPAD PANEL
    keypad.add(new JLabel("Loan Amount$ : "));
    keypad.add(lcdLoanAmt);
    keypad.add(new JLabel("Term of loan and Interest Rate: "));
    keypad.add(rateTermList);
    keypad.add(new JLabel("Monthly Payment : "));
    keypad.add(lcdMonthlyPmt);
    lcdMonthlyPmt.setEditable(false);
    keypad.add(new JLabel("Amortize Table:"));
    keypad.add(displayArea);
    displayArea.setEditable(false);//DEFINE BUTTONS PANEL LAYOUT
    buttons.setLayout(new GridLayout( 1, 3, 5, 5));//SET CONTROLS ON BUTTONS PANEL
    buttons.add(CalculateBtn);
    buttons.add(Amortize);
    buttons.add(ClrBtn);
    buttons.add(CloseBtn);//ADD ACTION LISTENER
    CalculateBtn.addActionListener(this);
    ClrBtn.addActionListener(this);
    CloseBtn.addActionListener(this);
    Amortize.addActionListener(this);
    rateTermList.addActionListener(this);//ADD PANELS
    pane.add(keypad, BorderLayout.NORTH);
    pane.add(buttons, BorderLayout.SOUTH);
    pane.add(scroll, BorderLayout.CENTER);
    addWindowListener( new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    String arg = lcdLoanAmt.getText();
    int combined = Integer.parseInt(arg);
    if (e.getSource() == CalculateBtn)
    try
    JOptionPane.showMessageDialog(null, "Got try here", "Error", JOptionPane.ERROR_MESSAGE);
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Got here", "Error", JOptionPane.ERROR_MESSAGE);
    if ((e.getSource() == CalculateBtn) && (arg != null))
    try{
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 1))
    monthlyInterest = interest[0] / (12 * 100);
    termInMonths = term[0] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 2))
    monthlyInterest = interest[1] / (12 * 100);
    termInMonths = term[1] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 3))
    monthlyInterest = interest[2] / (12 * 100);
    termInMonths = term[2] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Invalid Entry!\nPlease Try Again", "Error", JOptionPane.ERROR_MESSAGE);
    }                    //IF STATEMENTS FOR AMORTIZATION
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 1))
    loopy(7, 5.35);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 2))
    loopy(15, 5.5);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 3))
    loopy(30, 5.75);
    if (e.getSource() == ClrBtn)
    rateTermList.setSelectedIndex(0);
    lcdLoanAmt.setText(null);
    lcdMonthlyPmt.setText(null);
    displayArea.setText(null);
    if (e.getSource() == CloseBtn)
    System.exit(0);
    private void loopy(int lTerm,double lInterest)
    double total, monthly, monthlyrate, monthint, monthprin, balance, lastint, paid;
    int amount, months, termloop, monthloop;
    String lcd2 = lcdLoanAmt.getText();
    amount = Integer.parseInt(lcd2);
    termloop = 1;
    paid = 0.00;
    monthlyrate = lInterest / (12 * 100);
    months = lTerm * 12;
    monthly = amount *(monthlyrate/(1-Math.pow(1+monthlyrate,-months)));
    total = months * monthly;
    balance = amount;
    while (termloop <= lTerm)
    displayArea.setCaretPosition(0);
    displayArea.append("\n");
    displayArea.append("Year " + termloop + " of " + lTerm + ": payments\n");
    displayArea.append("\n");
    displayArea.append("Month\tMonthly\tPrinciple\tInterest\tBalance\n");
    monthloop = 1;
    while (monthloop <= 12)
    monthint = balance * monthlyrate;
    monthprin = monthly - monthint;
    balance -= monthprin;
    paid += monthly;
    displayArea.setCaretPosition(0);
    displayArea.append(monthloop + "\t" + calcPattern.format(monthly) + "\t" + calcPattern.format(monthprin) + "\t");
    displayArea.append(calcPattern.format(monthint) + "\t" + calcPattern.format(balance) + "\n");
    monthloop ++;
    termloop ++;
    public static void main(String args[])
    MORT_RETRY f = new MORT_RETRY();
    f.setTitle("MORTGAGE PAYMENT CALCULATOR");
    f.setBounds(600, 600, 500, 500);
    f.setLocationRelativeTo(null);
    f.setVisible(true);
    }need help with displaying the textarea correctly and the scroll bar please.
    Message was edited by:
    new2this2020

    What's the problem you're having ???
    PS.

  • Need help with trim and null function

    Hi all,
    I need help with a query. I use the trim function to get the first three characters of a string. How do I write my query so if a null value occurs in combination with my trim to say 'Null' in my results?
    Thanks

    Hi,
    Thanks for the reply. What am I doing wrong?
    SELECT trim(SUBSTR(AL1.user_data_text,1,3)),NVL
    (AL1.user_data_text,'XX')
    FROM Table
    I want the XX to appear in the same column as the
    trim.The main thing you're doing wrong is not formatting your code. The solution may become obvious if you do.
    What you're saying is:
    SELECT  trim ( SUBSTR (AL1.user_data_text, 1, 3))
    ,       NVL ( AL1.user_data_text, 'XX' )
    FROM    Tablewhich makes it clear that you're SELECTing two columns, when you only want to have one.
    If you want that column to be exactly like the first column you're currently SELECTing, except that when that column is NULL you want it to be 'XX', then you have to apply NVL to that column, like this:
    SELECT  NVL ( trim ( SUBSTR (AL1.user_data_text, 1, 3))
                , 'XX'
    FROM    Table

  • I need help with resetting my ichat. When i try to login now it wont let me... it says "AOL Instant Messenger password" and then "iChat can't log in to ... because your login ID or password is incorrect. How do I reset this if I cant log in?

    I need help with resetting my ichat. When i try to login now it wont let me... it says "AOL Instant Messenger password" and then "iChat can't log in to ... because your login ID or password is incorrect. How do I reset this if I cant log in? When I try to press online the same thing pops up and I have no way of logging in or asking for help.

    Hi,
    iChat (it would help to know which version) can accept Apple IDs as valid AIM Screen Names.
    However if you have iChat 5 or earlier you cannot use ones ending in @me.com or @icloud.com issued by iCloud. (they can be used in iChat 6 or Messages as these versions make a double login to AIM and Apple to allow the use of the password).
    In addition if you are using an Apple ID for an AIM Screen Name the password still needs to keep to the 16 character limit that AIM has.
    AN @mac.com name can be used on any version of iChat  (Until the 30th June 2014)
    As it does not need a double check with Apple you can use it to log in to the AIM Web pages
    Login here with an AIM Name registered at AIM or and @mac.com name and see if you get any suspended account messages.
    Sometimes account can be suspended. Usually because something has triggered the "Unusual Activity" item.
    About a year ago many @mac.com users that travelled out of their own country found themselves suspended when they got home.
    If the Name checks out of if an Apple ID the password in known to be 16 characters or Less then do this:-
    In Lion upwards open a Finder Window and use the Go Menu whilst holding down the ALT key.
    Select the Library that appears in the menu list.
    Navigate to Preferences.
    (If you have version earlier than Lion the just navigate to ~/Library/Preferences (that's the Library in you Home - Little House icon - folder)
    Fnd com.apple.ichat.aim.plist (even if you are using Messages)
    Drag the file to the Trash and Restart the app.
    7:39 pm      Thursday; May 29, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Need help with Airport Express and so on.

    Ok so my main problem before getting into what I need help with here is that our MacBooks and now my iPhone 6 plus isn't staying online. Keep getting booted off and then I either have to select the network again or it will eventually go back on. If anyone has a solution or so please feel free to answer that as well. I'm running on Roadrunner with a Netgear 600 wireless router and a motorola modem. Both of which I'll leave the link to below for a better look.
    My Main Question: So I'm looking at a new wireless router mainly and possibly a new modem. I know Apple products are trustworthy but how good is the Airport Express and other Airport products. Also what is the Maximum speed and Maximum data speed for the cheapest express station and if anyone knows the speeds of the other devices it would be greatly appreciated.

    DSL Router to Netgear 5-port Switch and I used the switch to connect to Airport Extreme, TV, Blue-Ray DVD player and DirecTV Receiver.
    The AirPort Extreme base station (AEBS) is a router so it will do what you need.
    You need to reconfigure your setup. Connect the WAN port of the AEBS to the DSL router. Then connect the Netgear switch to one of the LAN ports on the AEBS. The AEBS will properly share the connection.

Maybe you are looking for