Need help finding the sum of an array list

I'm making a mock up of iTunes, I suppose, for class. My only issue is that I can't figure out how to add all the durations of each sound file when it's stated in the array.
I've put the part I'm having trouble with in bold, it is located in the Jpod class. We're using a program called BlueJ for coding, which is why the commenting is slightly odd.
import java.applet.*;
import java.io.*;
import java.net.*;
public class SoundPlayer
    public SoundPlayer(String fileName, int duration)
        AudioClip testClip;
        URL testUrl;
        System.out.println("Playing " + fileName);
        try{
            testUrl=new URL("file:" + new File(".").getCanonicalPath() + "/" + fileName);
            testClip=Applet.newAudioClip(testUrl);
            testClip.play();
            Thread.sleep(duration*1000);
            testClip.stop();
        }catch(Exception e){ System.out.println(e.toString()); }
public class Sound
    private String author;
    private String fileName;
    private int duration;
     * Constructor for objects of class Sound
    public Sound(String newAuthor, String newFileName, int newDuration)
        // initialise instance variables
        author = newAuthor;
        fileName = newFileName;
        duration = newDuration;
     * Returns the duration of the sound file
     * @return     duration of the sound file
    public int getDuration()
        // returns duration
        return duration;
     * Returns the author of the sound file
     * @return     author of the sound file
    public String getAuthor()
        //returns author
        return author;
     * Prints the author, filename, and duration
    public void printSound()
        System.out.println("Author: " + author + " File name: " + fileName + " Duration: " + duration);
     * Plays the sound
     * @return     sound file
    public void playSound()
        new SoundPlayer("Lab4.wav",3);
import java.util.ArrayList;
import java.util.Iterator;
public class Jpod
    // instance variables - replace the example below with your own
    private ArrayList<Sound> playlists;
     * Constructor for objects of class Jpod
    public Jpod()
        playlists = new ArrayList<Sound>();
     * Adds a sound to the playlist
     * @param  sound   of type Sound
    public void addSound(Sound sound)
        // inserts the sound into the playlist
        playlists.add(sound);
     * Adds 3 sounds to a playlist
    public void createPlayList()
        Sound s;
        s = new Sound("Microsoft", "Lab4.wav", 2);
        addSound(s);
        s = new Sound("Dr. Evil", "DrEvil.wav", 4);
        addSound(s);
        s = new Sound("Arnold Schwarzenegger", "Terminator.wav", 2);
        addSound(s);
     * Remove desired sound object
     * @param indexNumber The number of the sound object to be removed
    public void removeSound(int indexNumber)
        if(indexNumber < 0){
            //Not a valid index number - do nothing
        else if(indexNumber < playlists.size()){
            //Valid indexNumber
            playlists.remove(indexNumber);
        else {
            //Not a valid index number - do nothing
     * Show the sound object
     * @param indexNumber The number of the sound object to be shown
    public void getSound(int indexNumber)
        if(indexNumber < 0){
            //Not a valid index number - do nothing
        else if(indexNumber < playlists.size()){
            //Valid indexNumber
            System.out.println(playlists.get(indexNumber));
        else {
            //Not a valid index number - do nothing
     * @return The number of sounds in the playlist
    public int getSize()
        return playlists.size();
     * List all sounds in the playlist
    public void indexPrintList()
        for(Sound playlist : playlists) {
            playlist.printSound();
     * Lists all sounds in the playlist using an iterator
    public void iteratorPrintList()
        Iterator<Sound> iter = playlists.iterator();
        while(iter.hasNext()) {
            ((Sound)iter.next()).printSound();
     * Gives the total duration of all sounds in the playlist
    *public void totalDuration()*
        *//currently prints all durations - still working on sum*
        *for(Sound playlist : playlists) {*
            *System.out.println(playlist.getDuration());*
     * Plays through all the sounds in the playlist
     * Extra Credit
    public void indexPlayList()
        for(Sound playlist : playlists) {
            playlist.playSound();
     * Plays through all sounds in the playlist using an iterator
     * Extra Credit
    public void iteratorPlayList()
        Iterator<Sound> iter = playlists.iterator();
        while(iter.hasNext()) {
            ((Sound)iter.next()).playSound();
}

not sure if I'm missing something here, but this could possibly be solved by initializing a variable to 0 before the for loop, and then adding each duration to this variable as you loop. This seems too trivial a solution though. Again, I may be missing something here.
something simple like:
public void calcSum()
    int i = 0;
    for(Fubar foo: fooList) {
        i += foo.getLength();
    System.out.println("Sum = " + i);
}Edited by: petes1234 on Oct 23, 2007 9:09 AM

Similar Messages

  • Need help finding the best Mac for gf

    hi I need help finding the best desktop. I am looking to buy MAC for gf.
    she uses final cut program question is does the GB/RAM/STORAGE matter on performance?
    She has a 2009 Apple computer I want to upgrade her to a new one
    I Dont know much when it comes to specs. She edits tons of videos and pictures.
    what's recommended for a video/photo editor that's good in performance ?

    Pro consumer might go with iMac even.
    Final Cut Pro latest benefits from dual AMD graphics.
    Video is one animal, graphics a much different.
    Great site full of performance, buying and configuration ideas:
    MacPerformance Go to the main topics
    I think you need to get clear on budgets. start with mid range and add all the options and can spend $4,000 or $7,000.
    Go to the Mac Store and do some looking and Google for reviews of software, hardware of course.
    Barefeats
    Rumors Pro
    Visit the forum for FCP-X would be a place to start.
    Final Cut Pro X

  • Need help finding the right codec to play QT files

    Like many others who have posted, all the quicktime files on my drive have turned to black. Previously when I opened the file, I saw picture and sound. Now every single file has only audio, but the picture is black.
    I am operation on Mac O.S. 10.4.11. I am using Quicktime Pro 7.5. I have been trying to fix this problem for a month now. Many people have suggested I need to find the right codec, but so far I have not found it. I have tried: A52codec.component, AC3codec, MacOS 8.x, 9.1.x, Apple Intermediate Codec.com, Apple MPEG2.codec.component, Avilmporter-r7.component, DivX Decoder.component, DivX Encoder.component, DivX Pro 6.8.0.19 + keymaker, EnsharpEncoderMacOsX.cmg, Fbx 20091quicktime_macemu.pkg.tar, Fbx QT.pkg, Flipsformac, WMV Advanced.component, Flipsformac WMV Advanced Exports.component, Flipsformac WMV Import.component, IMXCodec.component, LAAME Universal Installer.mpkg, LAAMEncoder.component, QSSP_2.1.dmg, QSXEssentials.component, QSXEssentials.dmg, QTFvx.component, Red Quicktime Codec v3.1.pkg, Red Code iedcod.qt.component, Spectrograph.component, TSCC.component xiphqt.component, XviD_codec-r58.component, XviDELEGATE.component
    Nothing worked!
    I also tried to install Perian. This did not work.
    What should I do? Should I re-install my operating system and start over? About a month ago, all the video clips played just fine. Is there any solution?
    Thanks

    Hi Wangerer!
    I haven't even heard of half of those! You may have reached overkill on codecs!
    Get rid of some of them and read this:
    These are the downloads and the settings you need in order to view/hear pretty much everything that the net can throw at you: The setup described below has proved repeatedly successful on both PPC and Intel macs, but nothing in life carries a guarantee!
    It is known to work in the great majority of cases with Safari 3.0.4, 3.1, 3.1.1, QT 7.3, 7.4.x and 7.5 and OS 10.4.11.
    Assuming you already run Tiger versions OS 10.4.11 and have Quicktime 7.4 or above, and are using Safari 2 or 3, download and install (or re-install even if you already had them) the latest versions, suitable for your flavor of Mac, of:
    RealPlayer 11 (which is no longer in beta) for Mac from:
    http://www.versiontracker.com/dyn/moreinfo/macosx/15540
    Flip4Mac WMV Player from http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx (Windows Media Player for the Mac is no longer supported, even by Microsoft)
    Perian from http://perian.org/
    You should read this support page http://perian.org/#support in case you need to delete older codecs.
    Adobe FlashPlayer should first be uninstalled using the appropriate uninstaller available here:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14157&sliceId=2
    and then the latest version obtained from here:
    http://www.adobe.com/shockwave/download/download.cgi?P1ProdVersion=ShockwaveFlash
    and installed.
    (You can check here: http://www.adobe.com/products/flash/about/ to see which version you should install for your Mac and OS, but please see my footnote if you are running Leopard.)
    In earlier versions than QT 7.1.3 in Quicktime Preferences, under advanced, UNcheck Enable Flash, and under Mime settings/Miscellananeous only check Quicktime HTML (QHTM).
    You should also ensure, if you are running Tiger 10.4.11, that you have downloaded and installed all the correct version for your Mac of Security Updates up to and including 2008-004. (N.B. Security Updates require both a restart and a permission repair.)
    In Macintosh HD/Library/Quicktime/ delete any files relating to DivX (Perian already has them). However it should be noted that Perian is not an internet plugin and will not play DivX files imbedded on a website. For that you will need the DivX Player browser plugin available from http://www.divx.com/divx/mac/
    Now go to Safari Preferences/Security, and tick the boxes under Web Content (all 4 of them) to enable Java.
    Lastly open Audio Midi Setup (which you will find in the Utilities Folder of your Applications Folder) and click on Audio Devices. Make sure that both Audio Input and Audio Output, under Format, are set to 44100 Hz, and that you have selected 'Built in Audio'.
    Important: Now repair permissions and restart.
    You should also consider having the free VLC Player from http://www.videolan.org/ in your armory, as this plays almost anything that DVD Player might not.
    There is an additional 'fix' you could try if you are having problems with Flash and Quicktime, depending on which type of Mac you have:
    On Intel Macs, make sure that you are not running Safari in Rosetta. You can check this, and change it, in the Get Info window.
    On PPC Macs, go to the Hard Disk/Library/Internet Plug-Ins folder, and drag the file 'QuickTime Plugin.webplugin' to the desktop. Quit and restart Safari. If things have improved you can trash that file. If they haven't put it back, as the lack of this plug-in can cause QT content in some widgets to cease functioning.
    And now there is an additional kid on the block: SilverLight. Microsoft has created their own version of what a replacement for Flash should be. You can read more about it here:
    http://silverlight.net/
    So, if you go to any sites that have been designed for this new Silverlight stuff, you can download the plug-in from here (but make certain that you are downloading SilverLight v.1.0 for OS X (10.4.8 upwards):
    http://silverlight.net/GetStarted/
    FOOTNOTE
    If you are running Leopard:
    Some users have mentioned that the latest Flash Player (v.9.0.115.0) conflicts with Leopard, and that they have needed to revert to v. 9.0.47. This can be downloaded from here:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14266&sliceId=1

  • Need help finding the desktop applc of Adobe Reader for Palm OS

    Either I'm going blind, or Adobe just failed to include a download link for that Adobe Reader desktop application that takes care of converting regular PDF files to PDB files. I
    Here is Adobe Reader for Palm OS page, there you'll find a link to download a Free AR for the Palm OS, which installs a PRC file in your Palm, but there is no mention of its counter part application for the desktop
    Thanks in advance guys,
    JDL
    Post relates to: Tungsten E2

    javierdl wrote:
    Thanks for your replies guys
    WN,  thanks for the suggestion. I had just tried it actually. And it's a great alternative. But after using the other one, I can't help but notice how slow it is in my Palm TX. I think I would prefer to get the benefit of compressing/converting the files to PDBs. But no one seems to know where to get that application. I checked in my TX CD and I didn't find it.
    If your TX installation CD does not "auto-run" and present you with a menu to install additional software (including Adobe Reader for Palm), you can find it on the disc using Windows Explorer at:
    Palm CD > Int_English >  Essential_software > Adobe Reader for Palm
    In that folder is the installation (.exe) file which you run on your desktop.  It installs the desktop app, and the .prc file gets installed to the quick installer during the process.
    FYI...this software is slow and clunky on the handheld.  The conversion process is imperfect, and particularly with files which I have produced myself using Acrobat Distiller (the part of Adobe Acrobat which lets you "print" to the distiller to create a .pdf file from anything),  it sometimes doesn't even work.
    The best .pdf viewer I have used on my handhelds is actually the upgraded version of Documents To Go, which handles native .pdf files pretty well.  No conversion needed, just drop the files into your SD card, or Hotsync with Documents To Go desktop.
    Post relates to: None
    smkranz
    I am a volunteer, and not an HP employee.
    Palm OS ∙ webOS ∙ Android

  • Need help finding the variance??

    Hello. i am stuck i cannot find the variance. the formula is:
    n -1
    variance<---- 1 / count * sum (x (i) - mean) ^2
    i = 0
    I don't know what i am missing in my variance method. can someone point out what i am missing and how i can go about correcting it? I am not getting the correct total in my variance line and the assigned letter grades all come out as "C". Thanks
    Here is my code:
    import java.io.*;
       import java.text.*;
       import java.util.StringTokenizer;
        public class arraytestread{
           public static void main (String args []) throws IOException {
             int MAX = 100;
             int MIN = 0;
             int [] list = new int [MAX];
             int count = 0; //  ammount of items//
             double avg;
             double var;
             double stDev;
             BufferedReader stdin = new BufferedReader (new InputStreamReader (System.in));
             NumberFormat nf = NumberFormat.getNumberInstance ();
             nf.setMaximumFractionDigits (2);
             nf.setMinimumFractionDigits (2);
             count = read_list (list);
             avg = mean (list, count);
             var = variance (list, count, avg);
             stDev = std_dev (var);
             print_list (list, count, avg, stDev, var);
           public static int read_list (int [] list)throws IOException {
             BufferedReader stdin = new BufferedReader (new InputStreamReader (System.in));
             int count = 0;
             String item = stdin.readLine ();
             while (item != null)
                list [count] = Integer.parseInt (item);
                ++ count;
                item = stdin.readLine ();
             return (count);
           public static double mean (int [] list, int count){
             double sum = 0;
             double mean = 0; 
             for (int i = 0; i <= count; i++)
                sum = sum + list ;
    mean = sum;
    if (count !=0)
    mean = mean / (double) count;
    return (mean);
    public static double variance (int [] list, int count, double mean){
    double sum = 0;
         double sum1 = 0;
         double sum2 = 0;
         double variance = 0;
    for (int i = 0; i <= count; i++)
    sum = sum + list [i];
         sum1 = sum - mean;
         sum2 = sum1 * sum1;
         variance = (1 / (double) count) * sum2);
    return (variance);     
    public static double std_dev (double variance){
    double loop = 0;
    double std_dev = 0;
    double EPSILON = 0.05;
    double z = variance / 2.0;
    while (Math.abs(z * z - variance) >+ EPSILON) {
    z = (variance / z + z) / 2.0;
    loop++;
    std_dev = z;
    return (std_dev);
    public static void print_list (int [] list, int cnt, double avg, double stDev, double var) {
    NumberFormat nf = NumberFormat.getNumberInstance ();
    nf.setMaximumFractionDigits (2);
    nf.setMinimumFractionDigits (2);
    for (int i = 0; i < cnt; ++i)
    System.out.println (i + " : " + list [i]);
    System.out.println ("There were " + cnt + " scores to be evaluated.");
    System.out.println ("The calculated mean is " + nf.format (avg));
    System.out.println ("The Standard deviation is " + nf.format (stDev) + ".");
    System.out.println ("The variance is " + nf.format (var));
    System.out.println ("Letter grades are assugned as follows:");
                   for (int i = 0; i < cnt; ++i){
                   if (list [i] < ((avg) - ((1.5) * (stDev))))
                   System.out.println (nf.format (list [i]) + "     E");
                   else if ((((avg) - (1.5) * (stDev)) <= list [i]) && (list [i] < ((avg) - ((1.5) * (stDev)))))
                   System.out.println (nf.format (list [i]) + "     D");
                   else if ((((avg) - ((1.5) * (stDev))) <= list [i]) && (list [i] < ((avg) + ((1.5) * (stDev)))))
                   System.out.println (nf.format (list [i]) + "     C");
                   else if ((list [i] >= ((avg) + ((1.5) * (stDev)))) && (((avg) + (1.5) * (stDev)) > list [i]))
                   System.out.println (nf.format (list [i]) + "     B");
                   else if (((avg) + (1.5) * (stDev)) <= list [i])
                   System.out.println (nf.format (list [i]) + "     A");
                   else
                   System.out.println ("There were no scores to evaluate.");
    thanks
    Message was edited by:
    rexdart
    Message was edited by:
    rexdart

    I suspect your problem is probably within this code:
    if (list < ((avg) - ((1.5) * (stDev))))
                   System.out.println (nf.format (list [i]) + "     E");
                   else if ((((avg) - (1.5) * (stDev)) <= list [i]) && (list [i] < ((avg) - ((1.5) * (stDev)))))
                   System.out.println (nf.format (list [i]) + "     D");
                   else if ((((avg) - ((1.5) * (stDev))) <= list [i]) && (list [i] < ((avg) + ((1.5) * (stDev)))))
                   System.out.println (nf.format (list [i]) + "     C");
                   else if ((list [i] >= ((avg) + ((1.5) * (stDev)))) && (((avg) + (1.5) * (stDev)) > list [i]))
                   System.out.println (nf.format (list [i]) + "     B");
                   else if (((avg) + (1.5) * (stDev)) <= list [i])
                   System.out.println (nf.format (list [i]) + "     A");
    You need to simplify this logic so it is easier to understand. How about pre-calculating some of the values (such as "((avg) - ((1.5) * (stDev))") and putting that into a variable. It will make it much more possbile to check the logic of the individual "if" statements.

  • I need help finding the best Creative MP3 player for

    I've been searching through the product literature and not finding the information I need to make my decision. I'm hoping the people here might be able to help.
    I need one that does MOST if not all of the following:
    ) Audible audio book support.
    This is mandatory since 75% of my usage is books on the commute. If the player will have support "soon" as in the next month, then that is OK. I can limp along with my current player.
    2) Bookmarks.
    Since I mostly listen to books I need to be able to resume play at any point. It would be great if the player supported a bookmark per file, but I could handle one that only remembered the current position.
    3) In-Car use.
    By this I mean that it can receive power from a car adapter and will auto shut off and remember the playing position when the power is turned off. I was thinking of using a USB power adapter for the MuVo Tx FM, but I don't know if it will actually play when powered that way. I dri've 2hrs a day and that eats batteries too fast to not use the car power.
    Thanks for the help =)

    Altair,
    The Zen Xtra is the player you want. It currently has all three of the features you want available.
    ) It supports Audible with the latest firmware.
    2) It has a bookmark feature that lets you set multiple bookmarks and recall the position.
    3) It has a car mode that makes it shutdown when you turn off your car (assuming that your car outlet turns off when the keys are removed) and restart at where it was when you turn the car back on.
    Jeremy

  • Need help finding the applications in Windows 8.

    i have downloaded the creative cloud and installed photoshop and illustrator cc but can't open them? i have been stuck for some hours now. i need help please?

    Hello. You are running Windows 8?
    You need to navigate to your applications.
    Hit the windows key on your keyboard, you should see the start screen, where Lightroom and Photoshop should be. You can right-click on them to pin them to the task bar.

  • Need help finding the right logic board.

    So after months of work, I've come to the conclusion that I've fried it. So I'm pursuit of getting running, I was wondering if anyone could help me find the right logic board. Well, here are my original stats:
    iMac G3 Blondi Blue
    Tray Loading
    233 MHz
    32 MB RAM
    6 GB HD
    Here a few photos. I think it's one of the very first ones:
    http://webideas.com/images/imac/imacback_bberrysm.jpg
    http://img.mercadolibre.com.pe/jm/img?s=MPE&f=1363553_8198.jpg&v=P
    I deeply apreciate the help! Thanks!

    Never mind. I have found one. Thanks!

  • Need help finding the FP Get Configuration Info.vi in Labview 8.5

    I have had a problem with a program that I have put together to run a fieldpoint system. The program works fine on the development computer but as soon as I install it on a client pc i have problems with the program not linking to the .iak file.
    I have contacted NI and an engineer has said to me that I should include a ' FP Get Configuration Info.vi ' at the begining of my program and that should solve the problem.
    I am using Labview 8.5 and am unable to find the vi.
    Can anyone help and tell me where I can find the vi.
    Thanks

    Don't have 8.5 loaded right now.  Shows up in LV8.2 & LV8.6 on palettes under Measurment I/O>Fieldpoint>Advanced.  I'll assume that you have used the search function on the Functions palette.
    Have attached copy of LV8.2 vi for you to try.
    Message Edited by centerbolt on 01-05-2009 10:17 AM
    Attachments:
    FP Get Configuration Info.vi ‏34 KB

  • I backed up my iphone online need help find the backup

    I backed up my iphone online and cannot find where and how to retreive this information.

    gottakeepstitching wrote:
    Ok I will try to explain better.
    I had an iphone and backed it up to icloud online so I would not lose texts and numbers. My phone is gone, I need to retreive the messages especially from icloud to a readable format on my computer. I cannot use the phone or backup the phone to the computer as I no longer have it nor do I have any other cell phone.
    Is there a way to find my backup in icloud, move it to my computer and unlock\open it all without an iphone?
    I'm not sure why you didn't use this as your first post.  It would've save me some time answering you, instead of going in circles.
    you will need to buy another iphone to retrieve your icloud backup.

  • I need to play a DVD that was created on a microsoft machine on my Mac and need help finding the right converter software.

    I have received a "Data DVD" that was made on a windows machine and need to play it on my mac but am having trouble finding the right player or converter.I would like a free application if possible. Thank You,JerryStephen:-)

    I think I understand now.  The DVD has an auto start player (exe) that steps through the video's, html, whatever. Your gonna need windows or you'll be forced to look at the individual pieces seperately.  Html's you can open, idx files are subtitles, the video format is avi I'm guessing or maybe wma.
    Try this first, get the VLC player from video_lan.  It's a great tool to have in your toolbox.  It should play the video files at least (including subtitles).  VLC can play almost any format.

  • Need help finding the Motherboard parts number on Ideacentre B520

    Hi guys,
    I'm currently repairing an ideacentre B520 for a customer and need to have the MB parts # to have the parts ordered. 
    i've found a white sticker with somes number on it but I don't know which one is the MB parts number.
    Here the number:
    27*939530*126
    1a*2
    4*mfg: 1*2 (in bold)
    PL*00:u0* (in bold)
    46*9ae9*l01
    and the last one on another sticker.
    MB            11s1*013462z*0mP17*043  A*<
    (I've put somes * instead of caracters on purspose.
    Thanks

    Hi,
    The Motherboard part number starts with 11......
    If you download the Hardware Maintenance Manual from the Lenovo Support site, all the part numbers are there, as well as removal instructions.
    Good luck!
    CB2011

  • Need help finding the row where BI load failed

    Hi all,
    We use an ETL tool to load data from our staging database into our production data warehouse environment. The environment is Oracle 10g Release 1 on Red Hat Enterprise Linux Server. The ETL tool is Business Objects Data Integrator. At hand the issue is that the data load failed due to an Oracle error
    ORA-12899: value too large for column
    When I examined the table definition in question, the load fails on one of the table columns in staging since the column is a VARCHAR2 with length of 5 and the ETL load wants to load a value for the table of length 13.
    One possible solution is to change the column definition to accomodate the data load. However, since this is a production system, I cannot do this right now.
    Is there a method to find exactly what row it failed on during the ETL load for the table in question?
    Thanks!
    B. Scott

    1) Yes, DML error logging is nice feature but it is New Feature in Oracle Database 10g Release 2.
    2) Some tools (e.g. Oracle Warehouse Builder) enable you to run your "mappping" (ETL job) in 2 modes - set based (single transaction INS/UPD/DEL/MERGE) or in row based mode (PL/SQL loop, row by row processing). OWB even enables failover mode (I failed in set-based mode, let's failover to row-based mode to find out where is the problem; the errors will be reported in log; you can set maximum number of errors before the mapping terminates with failure status).
    3) If you do not have this functionality in your tool than I suggest: Try to understand the transformation and investigate the source data. You can usually find the culprit in the source data. Sometimes you can even extract the SQL behind the transformation and run CTAS (create table as select) and find the exceptions.
    Regards,
    Pavel

  • I need help finding the proper website for downloading the proper version of firefox for my PPC MAc

    ''locking as a duplicate of this - https://support.mozilla.com/en-US/questions/847742''
    I just asked this question but it got lost in the mail. I have a Mac PPC G5 2.0 MHZ dual Motorola processor and I need to know the proper version that my mac will work with and I need to know where on your site to go to get it. I need the exact link to download it please.
    Scott Goldberg

    Firefox 2.0.0.20 is the last release that runs on Mac OS X 10.2 and 10.3
    * http://www.mozilla.com/firefox/2.0/system-requirements/
    * https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.20/mac/en-US/
    Firefox 4 requires at least OS X 10.5 and an Intel Mac.
    * http://www.mozilla.com/firefox/4.0/system-requirements/
    * http://www.mozilla.com/firefox/3.6/system-requirements/

  • PM Reports: Need to find the sum of a particular field in the output.

    Hello Experts,
                          I have an issue. I have developed the report to calculate the power per ton. It is PM module.
    Input is : DATE & Measuring Point.
    Output required is : For a particular date , What is the power consumed per ton.
    Its is calculated by the formula Power consumed per day /  Production.
    I have multiple entries for production ( because different material are used )  per date and a single entery for power (because power is taken as total power consumed per day)
    Hence im getting the output as
    For example:
    date                power            production         power/ton
    01.03.2011      5000                    100                  50.00
    01.03.2011      5000                      50                 100.00
    01.03.2011      5000                      25                 200.00
    01.03.2011      5000                      75                  66.66
    The desired result is
    date                power            production         power/ton
    01.03.2011      5000                    250                  20.00
    I need to sum the production field.
    How can I achieve this ?
    Please help.

    Hello
    Rotate the loop and use event so on change just clear the variable based date condition .
    take 2  temp variable for summation
    clearing the total and moving value on permanent variable means modifying the itab.
    loop at .
    *Clear
    on change <datefield>.
    modify itab from wa  transporting <field name> .
    clear <total field>.
    endon.
    *Total
    t_prd  = t_prd + production..
    t_power = t_power + power .
    endloop.

Maybe you are looking for