Table - calculation adding up funny

Hi guys
Just a quick question on calculation in tables.
I have a few fields including a total field, total field all working fine. But I also want to get a grand total of the total field, but the calculation comes out funny e.g 1+1=3 or 3+1+1+1=21?
I've looked at a few other post to get this code.
My TOTAL INCOME FOR ACTIVITY code below
Form.budgetDetailsoption2_pg.budgetdetailsoption2_sf.Table1_sf.Table1.Income.Row2[5].Cell7 ::calculate - (FormCalc, client)
$.rawValue = sum(Table1.Income.Row2[*].Cell7);
Form.budgetDetailsoption2_pg.budgetdetailsoption2_sf.Table1_sf.Table1.Income.Row2[5].Cell6 ::calculate - (FormCalc, client)
"                                                                .Cell6);"
"                                                                .Cell5);"
"                                                                .Cell4);"
My Total code is just $.rawValue = Cell4 + Cell5 + Cell6 (this is working ok)
I'm just wondering why my TOTAL INCOME FOR ACTIVITY is adding up funny?
Thanks

Well your total income formula is totalling all the Cell7s in all the Row2s including the row2 where the formula is. Try renaming your total row to something else.

Similar Messages

  • How to update a jscrollpane as new tables are added?

    Following is the code of a search form which searches the address based on some search criteria and places the result in the form of table on the panel p3 which has scrollpane sp1. every time the user searches the address a new table adds to the panel but the problem is that as new tables are added to the panel and they get out of the panel the scrollpane does not show the scroll Knob on the scroll bar. please give me the solution that how to update the scrollbar as the new tables are being added to the panel?
    import javax.swing.*;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class Search extends JFrame implements ActionListener
         Container c;
         Toolkit tk;
         JLabel l1; int y=30;
         JPanel p1,p2,p3;     
         JRadioButton rbByName,rbBySirName,rbByID,rbByCity,rbByState;
         JButton btSearch,btView;
         ButtonGroup bgSearch;
         JTextField txtSearch;
         ImageIcon i1;
         Connection con;
         Statement st1;
         PreparedStatement pst1;
         ResultSet rs1;
         Object[][] data;
         public Search()
              super("Search-Address Management System");
              c=getContentPane();
              tk=Toolkit.getDefaultToolkit();
              //setLocation(150,100);
              setSize(1024,768);
              c.setLayout(null);
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              defineComponents();
              settingBounds();
              addListeners();
              addComponents();
              JScrollBar sb=new JScrollBar();
              JScrollPane sp1=new JScrollPane(p3,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
              sp1.setBounds(30,300,700,380);
              l1.add(sp1);
              setVisible(true);
         public void defineComponents()
              p1=new JPanel();
              p1.setLayout(null);
              p1.setOpaque(false);
              p2=new JPanel();
              p2.setLayout(null);
              p2.setOpaque(false);
              p3=new JPanel();
              p3.setLayout(null);
              //p3.setOpaque(false);
              i1=new ImageIcon("Images/Main1.jpg");
              l1=new JLabel(i1);
              rbByName=new JRadioButton("First Name");
              rbByName.setOpaque(false);
              rbByName.setForeground(Color.CYAN);
              rbBySirName=new JRadioButton("Last Name");
              rbBySirName.setOpaque(false);
              rbBySirName.setForeground(Color.CYAN);
              rbByState=new JRadioButton("State");
              rbByState.setOpaque(false);
              rbByState.setForeground(Color.CYAN);
              rbByCity=new JRadioButton("City");
              rbByCity.setOpaque(false);
              rbByCity.setForeground(Color.CYAN);
              rbByID=new JRadioButton("ID");
              rbByID.setOpaque(false);
              rbByID.setForeground(Color.CYAN);
              btSearch=new JButton("Search");
              bgSearch=new ButtonGroup();
              txtSearch=new JTextField();
              btSearch=new JButton("Search");
              TitledBorder tb=new TitledBorder("Search Criteria");
              TitledBorder tb1=new TitledBorder("Search");
              p1.setBorder(tb);
              tb.setTitleColor(Color.YELLOW);
              p2.setBorder(tb1);
              tb1.setTitleColor(Color.YELLOW);
         public void settingBounds()
              rbByID.setBounds(20,30,50,20);
              rbByName.setBounds(120,30,100,20);
              rbByState.setBounds(20,70,80,20);
              rbByCity.setBounds(120,70,50,20);
              rbBySirName.setBounds(240,30,100,20);
              p1.setBounds(30,40,400,110);
              p2.setBounds(30,180,400,80);
              //p3.setBounds(30,300,700,380);
              p3.setBackground(Color.BLUE);
              l1.setBounds(0,0,1024,768);
              txtSearch.setBounds(50,210,250,25);
              btSearch.setBounds(320,210,80,25);
              rbByID.setSelected(true);
         public void addListeners()
              btSearch.addActionListener(this);
         public void addComponents()
              p1.add(rbByName);
              p1.add(rbBySirName);
              p1.add(rbByState);
              p1.add(rbByCity);
              p1.add(rbByID);
              c.add(txtSearch);
              c.add(btSearch);
              c.add(p1);
              c.add(p2);
              c.add(l1);
              bgSearch.add(rbByID);
              bgSearch.add(rbByName);
              bgSearch.add(rbBySirName);
              bgSearch.add(rbByCity);
              bgSearch.add(rbByState);
         public void drawtable()
              int i=0,rows=0;
              String[] colNames={"ID","First Name","Last Name","City","State","Operation"};
              String stData=txtSearch.getText();
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con=DriverManager.getConnection("jdbc:odbc:dsnAddress");
                   if(rbByName.isSelected())
                        pst1=con.prepareStatement("select * from tbaddress where fname=?",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                        pst1.setString(1,stData);
                   if(rbByID.isSelected())
                        pst1=con.prepareStatement("select * from tbaddress where ID=?",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                        pst1.setString(1,stData);
                   if(rbBySirName.isSelected())
                        pst1=con.prepareStatement("select * from tbaddress where LName=?",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                        pst1.setString(1,stData);
                   if(rbByCity.isSelected())
                        pst1=con.prepareStatement("select * from tbaddress where City=?",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                        pst1.setString(1,stData);
                   if(rbByState.isSelected())
                        pst1=con.prepareStatement("select * from tbaddress where State=?",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                        pst1.setString(1,stData);
                   rs1=pst1.executeQuery();
                   rs1.last();
                   rows=rs1.getRow(); // get no. of rows
                   if(rows==0)
                        JOptionPane.showMessageDialog(this,"***No Record Found***",null,JOptionPane.INFORMATION_MESSAGE,null);
                        return;
                   data=new Object[rows][6]; //     makes an empty two dimensional array of
                                                   //     rows and columns to store data
                   rs1.beforeFirst();
                   while(rs1.next())            //     fills the array with data
                        data[0]=rs1.getString("ID");
                        data[i][1]=rs1.getString("Fname");
                        data[i][2]=rs1.getString("LName");
                        data[i][3]=rs1.getString("City");
                        data[i][4]=rs1.getString("State");
                        data[i][5]="View";
                        i++;
              catch(Exception e)
                   System.out.println("ExceptionSearch="+ e);
              MyTableModel tm=new MyTableModel(data,colNames);
              JTable t1=new JTable(tm)
              // Returning the Class of each column will allow different
    // renderers to be used based on Class
    public Class getColumnClass(int column)
    return getValueAt(0, column).getClass();
              JScrollPane sp=new JScrollPane(t1,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
              sp.setBounds(30,y,600,100);
              p3.add(sp);
              y=y+110;
              ButtonColumn buttonColumn = new ButtonColumn(t1, 5);
         }Edited by: erdeepak on Sep 22, 2008 4:12 AM
    Edited by: erdeepak on Sep 22, 2008 4:24 AM
    Edited by: erdeepak on Sep 22, 2008 4:25 AM
    Edited by: erdeepak on Sep 22, 2008 4:30 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Don't use null layouts. Learn how to use layout managers.
    The basic design of your frame should be something like this:
    JPanel tablePanel = new JPanel( set your desired layout manager here );
    JScrollPane scrollPane = new JScrollPane( tablePanel );Now when you invoke your search code to create a new table the code will be something like:
    JTable table = new JTable(...);
    tablePanel.add( table );
    tablePanel.revalidate();The revalidate() will invoke the layout manager and the new preferred size of the panel will be calculated and then scrollbars will be added if required.
    The key is to use a layout manager and to revalidate the panel containing the tables.

  • Expand the Warehouse tables X adding physical tables and joins

    I was questioned about these options:
    a) Add physical tables (from other DBs) and modifying the physical model with new joins + modifying logical model to include new columns
    b) Expand warehouse tables to include new columns in the tables. Doing a complementar ETL in order to feed the additional columns with data. Logical model would be updated but the idea in this option is to avoid joins in the physical layer.
    My understanding is that option a) despite the joins in the physical layer would be a better strategy.
    Pls. I'd appreciate any comments on the performance side or in the amount of effort to create the complementar ETL...
    Txs.
    Antonio

    Hi Lombo,
    I am not sure about what you mean with option a. In my understanding, you are asking for a comparison between:
    a) adding data from an additional source in the RPD:
    This means that you have to create an additional data source in the physical layer. I do not think you can create relations between physical tables sourced from different data sources in your physical layer. This means that the data is related in the logical layer. By doing this, the BI Server has to join the data from both sources for each front-end request. Also, it will have to perform the last aggregations instead of shipping it to the database. This is a big performance hit in terms of response time.
    However! It can be much and much faster in terms of development effort required to support this. If it's only a limited number of columns and tables being added, this may be a valid option. You can also use this approach to prototype option b.
    b) adding data from an additional source using ETL:
    Quite some work in terms of development effort. However, all complexity and performance hits are moved to the bottom of the stack and process: database and ETL. You will need to create an additional data source in the DAC, additional custom folder(s) in Informatica and the ETL logic to update the existing tables and/or load new tables.
    Additionaly, you need to expand the RPD with the new columns / tables, just as you would do in option a. However, now it will be sourced from the same datasource: less work for the BI Server to deliver the dataset to satisfy the request.
    So basically, I would consider:
    - How does the system currently perform: response times in the front end ( bad -> go for option b )
    - How many columns will be added and how often will they be used in the front-end
    - Informatica / DAC / OBI expertise available
    - How long do you have to facilitate reporting on data from the 2nd source
    Good luck!

  • How to Transport Rate Tables/Calculation Sheets/Agreements etc

    Hi All,
    How to add Rate Tables/Calculation Sheets/Agreements etc in a Transport Request ?
    Because while creating its not asking for Transport reequest.
    Reply ASAP pls.
    TM - 9.0
    Thanks,
    Michael.

    Hi Michael,
    We has the following for facilitate our life.Create templates for main objects.
    Then transport this objects (templates) and create again.
    Best regards.
    Renato Okamoto

  • Expanding table: Calculating difference to value from previous row

    Hi there,
    I am a complete newbie to LiveCycle Designer (ES2) and have created below document with an expanding table.
    Shared Files - Acrobat.com
    My aim is to make the form user friendly by adding a calculation in the field "Twist" which calculates the difference from the current row to the previous row.
    I have no idea about Java Script, I am afraid, and also don't know if this is possible at all so it's probably a bad idea after all.
    The reason for setting it up as an expanding table is so that the form can be used for all 32 instances the form would be used for (they would all require different amount of rows altogether).
    The calculation would start in row 2 (Checklist.Table1), take the twist value entered in row 2 and calculate the difference to the twist value entered in row 1.
    Then in row 3, it would calculate the difference between twist value in row 3 to row 2 etc.
    So subtract value of field in rown with value in rown-1 or something in this direction.
    Is there anyone at all who could help me with this at all?
    I'd be very grateful for any advice you could give me.
    Thanks a lot!
    Mathilda

    Not sure what happened with the formatting there, try this;
    if (Row1.index > 0 && !Row1.resolveNode("NumericField4[0]").isNull)
        var prevTwist = Table1.resolveNode("Row1[" + (Row1.index - 1) + "].NumericField4[0]").rawValue
        var result = Math.abs(3000 / (Row1.resolveNode("NumericField4[0]").rawValue - prevTwist));
       this.rawValue = result;
    else
        this.rawValue = "";

  • Suppressing Columns in Pivot table when adding subtotal

    Hi,
    We have a dimension hierarchy like this:
    Level 1 ---> Level 2 ---> Level 3
    T ---> A ----> B1
    T ---> A ----> B2
    T ---> C ----> D
    T ---> E ----> E
    The report we are trying to build is of this format:
    Row_Num --> Dimension --> Amount
    1 --> B1 ---> 100
    2 --> B2 ---> 50
    3 --> A ---> 150
    4 --> D ---> 75
    5 --> C ---> 75
    6 --> E ---> 100
    When using Pivot table and subtotals, we are getting the report as below: (where for Dimension Value "E" there are two rows)
    Row_Num --> Dimension --> Amount
    1 --> B1 ---> 100
    2 --> B2 ---> 50
    3 --> A Total ---> 150
    4 --> D ---> 75
    5 --> C Total ---> 75
    6 --> E ---> 100
    7 --> E Total ---> 100
    We do not want the subtotals to be calculated if Level 2 and Level 3 are the same.
    Any ideas on how to achieve this?
    Many Thanks,
    Seetharam

    Hi user7276913,
    Are you sure you are using a Pivot Table view? Or are you using the standard table view?
    In a pivot table, you can only have (n-1) sub-totals where n is the number of fields in your "Rows" section. So in your case you have two fields, so you can only have 1 sub-total. See my screen shot below where I have a similar situation:
    !http://i47.tinypic.com/icux5y.png!
    Note that in the screen shot only the first column has a summation and the second does not. This makes sense since a sub-total and the last column would be the same as the values being displayed in the "measures" section.
    What you described in your post seems more like what I'm seeing in a standard table view
    !http://i48.tinypic.com/34z12zp.png!
    Based upon what I'm seeing in your sample report, it seems like you are missing some kind of line item number or transaction number or some field that uniquely determines a row. If you add this field into the pivot table you will get exactly what you want.
    e.g. Pivot Table Rows = Customer # (with summation Enabled) , Document Type (Summation Enable), Line Number
    Good luck and if you found this post useful, please reward points!
    Best regards,
    -Joe

  • 6575722.994:   ADDITIONAL BLANK TABLE CELLS ADDED IN RTF HEADER

    HI all,
    XML:5.6.3
    APPS:11.5.10.2
    Please advice,
    RTF template associated with PO Output for Communication (tempalte uploaded). When previewed,
    data displays correctly.
    When output is viewed from Application, additional blank table cells are added in header area.
    These blank table cells are unwanted.
    Also :
    If I have multiple pages of output, the application is losing the header and footer after the
    first page.
    If I preview the template from Microsoft Word with the same output, the header and footer shows on
    all pages.
    Customer said:
    'not looking for help designing the template - I have a template that gives
    different output when output is viewed in the template builder and compared against the output from the application.
    I am looking for assistance on which output is incorrect, and what cna be done to ensure both outputs are consistent'
    thxs!

    check if you have any carriage return,or extra space in your tag
    or if you are using 'IF' condition try using @inlines.
    these are the general situations were extra space is created in your output

  • Problem with adf table when adding component in table column.

    Hi All,
    i am using jdev version 11.1.1.5.0.
    use case: i have created one adf table which is based on DC VO. now i have added one select one radio group component(which contain 4 radio button approved ,reject,back,None) in adf table.
    table have many rows for example in first row i have select approved and to next row i have select reject now when i get value of radio group in backing bean using component binding i got last selected value.(in that case reject).
    And second is that when i set radio button value for current row using binding like
    rb.setValue("R") then reject option selected for all rows.
    so my question is that-
    how can i get and set value of select one radio group in row level using component binding.

    Hi,
    I don't see a reason for not using a transient attribute for the radioGroup in your previous reply.
    Here is the example i tried.
                            <af:selectOneRadio label="#{bindings.DeptView1.hints.DeptnoRadio.label}" id="sor1"
                                    value="#{row.bindings.DeptnoRadio.inputValue}">
                                <af:selectItem label="A" value="A" id="si1"/>
                                <af:selectItem label="B" value="B" id="si2"/>
                                <af:selectItem label="C" value="C" id="si3"/>
                                <af:selectItem label="D" value="D" id="si4"/>
                                <af:selectItem label="E" value="E" id="si5" disabled="#{row.bindings.EnableDisable.inputValue}"/>
                            </af:selectOneRadio>Where DeptnoRadio is the transient attribute i've created (which will have some random values between A and E), and EnableDisable is another transient variable of boolean type which would return true or false based on some condition.
    Now, for every row, the value is different (and corresponding radio button is selected) and for a row, which matches the condition, the option E is disabled.
    -Arun

  • Data format in pivot table calculated item

    Hi All,
    I've got a pivot table with a dimension on rows and a dimension on columns and a measure. I have a "new calculated item" based on the dimension on the columns which does the following: ( ($2-$1) / ($1) ) *100
    I want this calculated item shown as a percentage like 1,2% but the measure must stay a whole number like 1234 (no decimal places or percentage symbols) any suggestions on how to achieve this?
    Thanks in advance!
    Gilles

    Hi Kishore,
    It is not helpful, I mean, it doesn't solve my problem. But nice post!
    What I have is the following:
    --------C1------C2-----C3
    R1|--123--|--345--|--678--|
    R2|--124--|--346--|--679--|
    R3|--125--|--347--|--670--|
    What I want is the following:
    --------C1------C2-----C3---------calculated item
    R1|--123--|--345--|--678--|--(($2-$1) / ($1) ) *100)
    R2|--124--|--346--|--679--|
    R3|--125--|--347--|--670--|
    the column results must remain in the same format, but the calculated item must be in the format %9.99 (to see the percentage change)
    any other suggestions?

  • Pivot table calculated column

    Hello ,
    I have created a pivot table like below
    ________________________________ *200908 .... 200909 .... 200910*
    No Matching data in A ........................ 500 ......... 550.............. 570
    No Matching data in B ........................ 650 .......... 700 ............ 720
    Now i want to calculate the difference for the latest month and prevoius month, and would like to display as below
    __________________________________ *200908 ..... 200909 ....... 200910......... Diff*
    No Matching data in A ........................ 500 ..............550 ........... 570 ..... 20
    No Matching data in B ........................ 650 .............. 750 ........... 725 .....-25
    I am getting the difference if i give static values like '200910' - '200909'
    But i want to get the difference dynamically like 'highest date' - 'next highest date'
    Please suggest some ideas.
    Thanks in advance.
    Edited by: user11049754 on Nov 18, 2009 12:48 PM

    hi abhi,
    Do you mean moving the column position,if so your saying it as calculated item so in pivot view it would be in the measures area.From there where you want to move it??
    My understanding from your question is that in the measure area if there is another column other than calculated item,you can move above it or below it.
    By,
    Kranthi.

  • Remove row from table when adding values to another table

    hi am adding value programticaly how can i remove the row i just  add from the table
    this is how am adding value
    public void addMember(javax.faces.event.ActionEvent actionEvent) {
    List<String> tempTable = new ArrayList<String>();
    //Code to get the bindings for TargetVO :
    RowKeySet selectedEmps = getEmpTable().getSelectedRowKeys(); 
    Iterator selectedEmpIter = selectedEmps.iterator();
    DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding empIter = bindings.findIteratorBinding("UserDetailsViewVO1Iterator");
    RowSetIterator empRSIter = empIter.getRowSetIterator();
    while(selectedEmpIter.hasNext()){
    Key key = (Key)((List)selectedEmpIter.next()).get(0);
    Row currentRow = empRSIter.getRow(key);
    onRowCreate(currentRow);
    boolean b = selectedEmps.remove(currentRow);
            i what to clear the row i just selected from the table
    AdfFacesContext.getCurrentInstance().addPartialTarget(empTable);
    // empTable
    public void onRowCreate( Row currentRow ) {
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    //access the name of the iterator the table is bound to.
    DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("addmemberBeanIterator");
    //access the underlying RowSetIterator
    RowSetIterator rsi = dciter.getRowSetIterator();
    //get handle to the last row
    Row lastRow = rsi.last();
    //obtain the index of the last row
    int lastRowIndex = rsi.getRangeIndexOf(lastRow);
    /*check if the user is added already*/
    /*OperationBinding oper2 = (OperationBinding) bindings.get("check if user exists method binding");
    oper2.getParamsMap().put("attributeName1", uniqueUserAttributeValue);
    Object ret = oper2.execute();*/
    //create a new row
    Row newRow = rsi.createRow();
    String f = (String)currentRow.getAttribute("Firstname");
    String s = (String)currentRow.getAttribute("Surname");
    String u = (String)currentRow.getAttribute("Username");
    String n = (String)currentRow.getAttribute("Emailaddress");
    // String orgid = (String)currentRow.getAttribute("Organisationid");
    newRow.setAttribute("firstname", f);
    newRow.setAttribute("surname", s);
    newRow.setAttribute("name", u);
    newRow.setAttribute("emailaddress", n);
    // newRow.setAttribute("Organisationid1",orgid);
    //initialize the row
    newRow.setNewRowState(Row.STATUS_INITIALIZED);
    //add row to last index + 1 so it becomes last in the range set
    rsi.insertRowAtRangeIndex(lastRowIndex +1,  newRow);
    //make row the current row so it is displayed correctly
    rsi.setCurrentRow(newRow); 
    System.out.println("Username " + u);
    System.out.println("firstname " + f);
    System.out.println("surname " + s);
    System.out.println("email " + n);
    // refereshpage();
    // return null;
    am in jdevloper 11.1.1.6.0
    my table is
    public void onRowCreate( Row currentRow ) {
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    //access the name of the iterator the table is bound to.
    DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("addmemberBeanIterator");
    //access the underlying RowSetIterator
    RowSetIterator rsi = dciter.getRowSetIterator();
    //get handle to the last row
    Row lastRow = rsi.last();
    //obtain the index of the last row
    int lastRowIndex = rsi.getRangeIndexOf(lastRow);
    /*check if the user is added already*/
    /*OperationBinding oper2 = (OperationBinding) bindings.get("check if user exists method binding");
    oper2.getParamsMap().put("attributeName1", uniqueUserAttributeValue);
    Object ret = oper2.execute();*/
    //create a new row
    Row newRow = rsi.createRow();
    String f = (String)currentRow.getAttribute("Firstname");
    String s = (String)currentRow.getAttribute("Surname");
    String u = (String)currentRow.getAttribute("Username");
    String n = (String)currentRow.getAttribute("Emailaddress");
    // String orgid = (String)currentRow.getAttribute("Organisationid");
    newRow.setAttribute("firstname", f);
    newRow.setAttribute("surname", s);
    newRow.setAttribute("name", u);
    newRow.setAttribute("emailaddress", n);
    // newRow.setAttribute("Organisationid1",orgid);
    //initialize the row
    newRow.setNewRowState(Row.STATUS_INITIALIZED);
    //add row to last index + 1 so it becomes last in the range set
    rsi.insertRowAtRangeIndex(lastRowIndex +1,  newRow);
    //make row the current row so it is displayed correctly
    rsi.setCurrentRow(newRow);  
    System.out.println("Username " + u);
    System.out.println("firstname " + f);
    System.out.println("surname " + s);
    System.out.println("email " + n);
    // refereshpage();
    // return null;

    hi,
    make the table selection single and use this links 4 ur task.
    http://www.baigzeeshan.com/2010/06/deleting-multi-selected-rows-from-adf.html
    http://deepakcs.blogspot.com/2013/01/ejb-dc-deleting-multi-selected-rows.html
    https://forums.oracle.com/thread/2534813
    https://blogs.oracle.com/jdevotnharvest/entry/iterating_selected_rows_in_an
    txs

  • Two internal tables - calculation

    Hi all,
    i have two internal tables:
    1. structure:
         line: workarea e.g.      1      2      3
                                          2      3     6
    2. structure:
                                          3000
                                          6000
                                          2000
    Now should be build a sum.
    Look at structure 1. For the first sum we need entry 1, 2 and 3 from structure 2. (3000 + 6000 + 2000 = 11000)
    The next sum is calculated by the entry 2, 3 and 6 .......
    Any ideas how to do this?
    regards

    Hi,
    Check the below code.
    data: begin of itab occurs 0,
          num1 type i,
          num2 type i,
          num3 type i,
          end of itab.
    data: begin of itab1 occurs 0,
          num1 type i,
          num2 type i,
          num3 type i,
          end of itab1.
    data: v_tabix type i,
          v_first_sum type i,
          v_second_sum type i.
    itab-num1 = 1.
    itab-num2 = 2.
    itab-num3 = 3.
    append itab.
    itab-num1 = 2.
    itab-num2 = 3.
    itab-num3 = 6.
    append itab.
    itab1-num1 = 3000.
    itab1-num2 = 6000.
    itab1-num3 = 2000.
    append itab1.
    itab1-num1 = 5000.
    itab1-num2 = 4000.
    itab1-num3 = 1000.
    append itab1.
    loop at itab.
    clear: v_first_sum, v_second_sum.
    v_tabix = sy-tabix.
    v_first_sum = itab-num1 + itab-num2 + itab-num3.
    write:/ 'Sum of record ', v_tabix, '= ', v_first_sum.
    read table itab1 index v_tabix.
    if sy-subrc = 0.
      v_second_sum = itab1-num1 + itab1-num2 + itab1-num3.
    write:/ 'Sum of record ', v_tabix,  '= ', v_second_sum.
    endif.
    endloop.
    Edited by: Velangini Showry Maria Kumar Bandanadham on Apr 30, 2008 8:56 AM

  • Smartforms-table-calculations tab usage............

    Hi sap gurus,
    i am designing a  smartforms in which i have created a table of data. this contains line items.
    one of the field is amount.
    a) how to sum up all the amount of each line item so as to display at the footer.
    please tell me how to use
    calculations tab in table --> to calculate the sum...
    please tell me if u r not clear about my question......
    Thanks
    krishna
    Edited by: krishna chaitanya on Mar 10, 2008 11:15 AM

    Hi,
      In smartform 
    Click on global definition>  declare one variable to collect the SUM amount.Ther in    INITIALIZATION->import parameter pass your ammount field.
    And wite code there 
    v_amount = v_amount + 1.   
    In main window  pass this amount field where you want to display

  • Going to the last page of a table when adding a new object

    I added a Table(com.sun.rave.web.ui.component.Table) on my page and a button outside of that table to add new object rows. My problem is that I want the table to move to the last page when I add a new object. Instead the default bahaviour is showing the first page. Even if the newly added row is on a page > page 1.
    e.g If I have a table with 5 pages and I am on page 1 and I add an object I want to see the last page of the table where I added the new object. In other words I want it to go to page 5 or page 6 in case the number of the new object is > the number of displayable rows of a page.
    I did it with Javascript but I just dont like it. I wanna do it programmatically.
    Any help?
    Thanks in advance guys!!!

    Hi!
    Try to look here:
    http://forum.java.sun.com/thread.jspa?threadID=5142038&tstart=45
    Thanks,
    Roman.

  • How to reference table rows added using addInstance?

    OK, this one's probably quite simple, but I'm at wit's end . . . .
    I have a table with body rows that can be added using addInstance.  what I can't figure out is how to reference the newly added rows and teh fields within them.  If the row reference for the inital row before addInstance is:
    Table.Row1.CellName before the addInstance, after the addInstance wouldn't it be Table1.Row1[0].CellName and the newly added row be Table1.Row[1].CellName?  I try that and the debugger tells me that Table1.Row1[1].CellName has no properties.
    I basically need to determine whether the user has filled out anything in the added rows and I'm having a devil of time figuring out how to reference the added rows and their cells.  Thanks in advance!

    Your logic is correct but to reference that som expression you woudl have to use this notation:
    xfa.resolveNode("Table1.Row[1].CellName").method or property
    The reason for this is the use of the square brackets. Javascript interprets this an an array. When you use the resolveNode method you can pass a string and hence the square brackets get interpretted correctly.
    Paul

Maybe you are looking for