Summing Columns

I am using LiveCycle Designer version 8 and I am very new to this program. I need help in summing a column. I can sum the rows but I can not seem to get the columns to sum. I have been trying to use FormCalu to add the formula. I have check for the common errors of referencing or mispelling a cell in the column that I am trying to sum. Any help would be greatful. Thanks,

Hi both of you,
Are there any joins involved in the report where you're trying to add the sum? If so, please check the master-detail definition in the join. If it's the wrong way around, then Discoverer can refuse to calculate a total, because there is a risk of "summing apples and bananas".
Other option is that one of the functions involved can result in a null value (litteraly: maybe it doesn't show any nulls, but the function could theoretically result in null), if so then Discoverer also doesn't sum them up. Reasoning is that no aggregations are done on "potentially null containing items". This is very good if you're trying to calculate an average (because how on earth would Discoverer know how to handle nulls in an average), but it's a bit annoying with a sum... Anyway, change the functions so that they can never ever result in null, or write a view around it to "wrap" the nulls or... come up with anything to avoid nulls.
(before you go into this, first remove the data resulting from functions, if possible, to make sure that the sum does indeed get calculated if then, so you know for sure that the functions are causing it now).
Regards,
Sabine

Similar Messages

  • Sum Column Script

    This is not working; THANK YOU to anyone kind enough to point out what's missing.
       <field h="5.293mm" name="IncomeTotal" w="19.134mm" x="54.478mm" y="126.775mm">
                <ui>
                   <textEdit>
                      <border hand="right" presence="hidden">
                         <?templateDesigner StyleID aped0?></border>
                      <margin/>
                   </textEdit>
                </ui>
                <font size="11pt" typeface="Myriad Pro"/>
                <para vAlign="middle"/>
                <traversal>
                   <traverse ref="TextField4[3]"/>
                </traversal>
               <sum(IncomeTotal [Income1, Income2, Income3, Income4, Income5, Income6, Income7, Income8, Income9])>
             </field>

    Hi,
    First of all I would not recommend inputting script directly in the XML Source. If you go to the Design View you can open the Script Editor (5) from the Windows menu. I would recommend making it larger, so that you can see a few lines of script:
    You can see an example here for referencing objects in both JavaScript and FormCalc. This also includes an example for summing columns: http://assure.ly/kUP02y.
    Niall

  • Preview does not sum column data in PDF forms

    Preview is way better than Acrobat for most purposes, but it has some basic limitations that just make it hard to use. for example I have to use this form that asks you to enter $ in a table, however Preview does not sum the column, it just puts a "0" in. Why doesn't Preview add? Plus, this default behaviour makes it harder to paste in my own number as there is a zero in the way. At least it would be nice if it could just remove the 0 and leave me with an editble section. Is this just the product of a badly created PDF form or, as I suspect, a limitation of Preview?

    I'm having the exact problem. I have a fillable PDF form that has many checkboxes. Saving the pdf (doesn't matter whether it's 'Save', 'Save All', or 'Save As' under the File menu) will clear/reset the checkboxes in the file.
    Anyone know of a workaround for this? Or, is Apple fixing this soon? I really don't want to get Acrobat Pro 9 (well, I don't think it's compatible with Snow Leopard yet anyway)
    If you'd like a sample PDF file to try it out, let me know.
    Thanks.

  • Need help with summing column when using if-then-else

    Using logic
    <?xdofx:if INVOICE_BILL_AMT_IN_INV_CURR is null then INVPROC_BILL_AMOUNT else INVOICE_BILL_AMT_IN_INV_CURR end if?> for column field.
    Having trouble summing the column using the logic above.
    Any suggestions would be very much appreciated.
    Thanks,
    Nancy

    Thanks Tim,
    That worked. Got rid of my error. However, if the field is null (=''), I get a total.
    11.05 + 1429.70 = 1440.75
    If the not null (!='') I am not getting a total.
    103.74 + 173.13 =
    BTW, recently took XML class. Leta Davis highly recommended your blog and I have gotten a lot of great tips from it.
    Thanks,
    Nancy

  • Show sum column item Report in another item TEXT ?

    I have a report region to the query "select * from emp" and would like to display the sum of the salt field in another item using the TEXT APEX_APPLICATION.G_F01 rather than run the querie again without using a submit button, or whenever to have a page refresh the data are updated. This has to do?
    Ps: My apologies for my English because I used google translate.

    you need to use lookup column .
    Try this 
    http://blogs.sharepoint911.com/blogs/jennifer/Lists/Posts/Post.aspx?ID=53

  • Help Needed to Sum Column in Fixed Table

    I am new to LiveCycle.  I need to sum a column in a fixed table.  My rows are summing correctly.  I have tried every formula on the web both in FormCalc and Javascript.  I've cut and pasted script from Adobe templates and from forms on the web.  Nothing is working.  Each change produces a new set of errors.  The Hierarchy is:  (untitled Subform) (page 2), Table 2, Header Row {Header Row contains Year 1, Year 2...Year 5}, Row1 {Row1 contains Text Title, Cell2, Cell3, Cell4, Cell5, Cell6, (untitled Numeric Field) which is a calculated sum of Years 1-5}, Row2, Row3...Row7 are exactly the same.  I want to calculate the sum of each column in the footer row but I keep getting script errors.

    I am new to LiveCycle.  I need to sum a column in a fixed table.  My rows are summing correctly.  I have tried every formula on the web both in FormCalc and Javascript.  I've cut and pasted script from Adobe templates and from forms on the web.  Nothing is working.  Each change produces a new set of errors.  The Hierarchy is:  (untitled Subform) (page 2), Table 2, Header Row {Header Row contains Year 1, Year 2...Year 5}, Row1 {Row1 contains Text Title, Cell2, Cell3, Cell4, Cell5, Cell6, (untitled Numeric Field) which is a calculated sum of Years 1-5}, Row2, Row3...Row7 are exactly the same.  I want to calculate the sum of each column in the footer row but I keep getting script errors.

  • How do you sum columns in same view

    I have a search component (drag and drop the viewCriteria) with a table.
    In the table is a column for an amount (number). I need to sum the amount and put it in the footer.
    I have done this many times with master/detail. Lots of info on that on the web as well. Really simple.
    In the view:
    So I create a transient attribute (sumAmount).
    I set the value to Expression and use one of the following (and several others that are not here).
    On the screen:
    drag SumAmount from the DC onto the footer. (OutputText no label)
    OK so far!?
    Run and query - (wishful thinking)
    Change the query and new totals appear (not that far yet).
    I have tried several permutations.
    adf.object.sum("Amount")
    sum("Amount")
    adf.object.ViewVO.getrowset.sum("Amount")
    All show absolutely nothing - I have the output text defined in the footer and the footer is displaying fine.
    The table also has some dates in the criteria - when I generate the rowImpl - the search panel is rendered useless due to the Date Domain vs Sql Date ( I know how to manage this)
    This has to be simple - just need to get a bit of help on it.
    I have tried to do this similar to the master/detail (but in this case - no detail). Still no value.
    I should be able to create a "formula" column without the use of java rowImpl.

    Finally - I have all the pieces - they are (were) as follows.
    1) create the View Object.
    2) add the summary column (transient) (be sure to get the data type correct (Number or BigDecimal)).
    3) create the view object implementation. (the Java tab in the view object - first box)
    4) create the view row implementation and expose the accessors. (the Java tab in the view object - second box).
    5) use Steve Muench's help to do the summation - it is a bit tricky and it has a depreciated call in it - but it works. (it is easy to modify to fit - just get the right attribute name for the sum & data type - I used Big Decimal)
    http://otn.oracle.com/products/jdev/tips/muench/recalctotalvo/RecalcTotalOfRowsInVO.zip (may have to look for the proper link - I found a lot of broken references)
    6) add a footer to the table in the search page and drag and output text box into it (all one step with drag and drop) - leave it empty.
    7) in the bindings page of the screen - add an attribute binding for the summary column from the Application Module.
    8) once the binding is made, go back to the output text box and use the inspector to create an expression and bind the value to "adf bindings" - data - and select the view-backing definition from the binding you just created.
    9) if you want to format this to right justified - surround with JSF HTML "panel grid - 1 column width=100% and style= text:align right - I usually do bold as well.
    10) sit back, relax and run - it should work.

  • Sum Columns in a jTable?

    (Wasn't completely sure where to post this... but jTable is Swing, right?)
    I have a jTable displaying a database table containing integers corresponding to seats booked. I want to sum these integers in a final column.
    However, the table also contains Primary and Foreign key columns which are also integers. I don't want to sum these, obviously.
    Like this:
    PKey FKey1 FKey2    Col1  Col2  Col3  Col4  Total
    1    2     3        1     0     2     1     4
    2    3     3        1     1     2     2     6
    3    6     8        1     3     1     1     6However, I really haven't been doing this very long, and have no idea where/how to sum these values. Do I write some kind of renderer? Can I do some kind of "int Total = Col1+Col2... etc;"? Or do I sum the values on a lower level and then display the result in the table? In other words: "Help! I'm lost!"

    Well you would probably calculate the total as you first populate the TableModel.
    Then if you data changes dynamciallly you would use a TableModelListener to recalculate the total. Here is a simple example:
    [http://forums.sun.com/thread.jspa?forumID=57&threadID=566133]

  • Auto sum Column accumulated value in gridview

    The principle seems simple but I'm in trouble. Did anyone have an example or script to auto sum of a column in the gridview. Explain, I have a gridview with the columns:
    amount, unitary value, total value and accumulated value. I need the accumulated value column add the previous value
    to the current value. For example:
    quantity unitary_value total_value accumulated_value
    10 10,00 100,00 100,00
    20 50,00 1.000,00 1.100,00
    5 500,00 2.500,00 3.600,00
    Basically it would be up. The column value (accumulated value) takes the value of the previous line and adds to the current value.
    If you can help !!
    Thank you for your attention.
    Thank you for your attention.

    No you're right with the calculation of the first post, I got it wrong. Now check the below solution, you need to use RowDataBound event of the gridview to do the calculation and print in the cell:
    //This is just a method to fill the datatable with dummy data(you can ignore in your code)static DataTable GetTable()
    // Here we create a DataTable with four columns.
    DataTable table = new DataTable();
    table.Columns.Add("quantity", typeof(double));
    table.Columns.Add("unitary_value", typeof(double));
    table.Columns.Add("total_value", typeof(double));
    table.Columns.Add("accumulated_value", typeof(double));
    // Here we add five DataRows.
    table.Rows.Add(10, 10, 0, 0);
    table.Rows.Add(20, 50, 0, 0);
    table.Rows.Add(30, 40, 0, 0);
    return table;
    protected void Page_Load(object sender, EventArgs e)
    //Bind the gridview to the datatable
    GridView1.DataSource = GetTable();
    GridView1.DataBind();
    //Global var to keep accumulated value of each rowo
    double _accumulatedvalue = 0;
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    if (e.Row.RowType == DataControlRowType.DataRow)
    //Create total value column by multiplying cells 1 and 2(maybe you don't need this)
    Double val = Convert.ToDouble(e.Row.Cells[0].Text) * Convert.ToDouble(e.Row.Cells[1].Text);
    e.Row.Cells[2].Text = val.ToString();
    //Accumualated value and fill the cell related (you can replace val below with Convert.ToDouble(e.Row.Cells[2].Text)
    _accumulatedvalue = _accumulatedvalue + val;
    e.Row.Cells[3].Text = _accumulatedvalue.ToString();
    Fouad Roumieh

  • Summing column values in sortable dataset

    http://cccw.ecologik.net/admin/lookup/
    Simple page that has a reapting region that is sortable. You notice at the bottom of the table I have a "Total Saved." I would like this to be able to sum up the pSaved column. I know I could get this dynamically when I first create the table in php but once the user sorts, how can I recount the pSaved column? I would think this is a common request but can't seem to find anything about it out there!
    Thanks for any help in advance.
    Jon

    Thanks for the response. After a bit of digging I came up with a solution myself.
    I simply added decided to sum the fields as they went through the filterFunc()
    if (!document.getElementById("containsCB").checked)
        regExpStr = "^" + regExpStr;
        sumOfFields=0
        var regExp = new RegExp(regExpStr, "i");
        var filterFunc = function(ds, row, rowNumber){
           var columnNames = ["Last","First","email","watershed","pledge","City"],
           result = false;
             for( var i = 0; i < columnNames.length; i++ ){
                        // search for a match
                   if( row[ columnNames[i] ] && row[ columnNames[i] ].search( regExp ) != - 1 ){
                        result = true;
                        sumOfFields=sumOfFields + Number(row["pSaved"])
                        break; // stop looping.
    on the table page itself I added small piece of code.
    <script type="text/javascript">
              document.getElementById("resultsArea").innerHTML=sumOfFields;
    </script>
    Works like a charm! Thanks again for the input!

  • Total a summed column

    Hi everyone,
    I have a question regarding a report that I'm working on. I have a column that uses the following formula: (Sum(material_qty))*1.5. I want a grand total at the bottom of the page of this column; however, it doesn't appear. Is it because Discoverer cannot do nested aggregations? I would appreciate any help or suggestions.

    Hi,
    Maybe you have wrong joins. You can't make a total using master folder values.
    If it's no the problem, you can modify pref.txt file if you are using Plus or Windows Registry if you are using Desktop.
    Hope this helps.

  • Sum columns in datagrid

    Hi All,
    I have a DG with multiple columns (Numbers), the values are coming from an array collection.
    What is the best way to sum couple columns? like
    Column01 + Column02 = ColumnTotal
    I try using a labelFuction in the column like:
    private function sumColumns(item:Object, col:DataGridColumn):String {
       var tempNumber:Number = parseFloat(item.column01) + parseFloat(item.column02);
       return tempNumber.toString();
    But the result doesn't reflect in the arraycollection. Should I create the column with values at the time of received the results?
    If I do this, when I change the value in any of the columns 01 or 02 it doesn't change the total.
    Thanks for your help.
    Johnny

    Yes, immediately after u receive the result create another property in the and assign the sum of two columns to it and then assign it to the datagrids data provider. the property that you create will be mapped to the column which shows the sum. if you are using label function to get the sum you can se a lot of calls med to the label function even when you scroll, this is all unnecessary memory hog.

  • Help w/Sum column

    The following query will return the last 10 records of a table where the record date falls within the first and last of the current month:
    <pre>
    SELECT *
    FROM (
    SELECT p_id, f2, amount, date1
    FROM mytable a
    WHERE a.date1
    BETWEEN TRUNC(SYSDATE,'MM') AND LAST_DAY(SYSDATE)
    ORDER BY a.date1 DESC, amount DESC
    WHERE rownum <= 10;
    </pre>
    Now I need to add a column to this query resultset that will have SUM(amount) for ALL the records in the current month (not just the last ten). The idea is that I can hide that last column from my application but still have the field available (total) to add as a footer.
    I tried (eliminating the semi-colon after the ten and then appending the following code to the query above:
    UNION
    SELECT '1','2,SUM(amount), SYSDATE
    FROM anothertable b
    WHERE b.date2
    BETWEEN TRUNC(SYSDATE,'MM') AND LAST_DAY(SYSDATE);
    ...but all that this does is adds a first record to the recordset with constants "1" and "2" to the first two fields, the desired total sum for the whole month, and the current date. However, I want that sum as another column (even though it may be there ten times), not at the top as another record.
    How can I do this?
    Thx!

    You could just add another subquery, like so:
    SELECT *
    FROM (
      SELECT p_id, f2, amount, date1,
          ( select sum(amount) from mytable
            where date1 between trunc(sysdate,'mm') and last_day(sysdate)) amount_total
      FROM mytable a
      WHERE a.date1
      BETWEEN TRUNC(SYSDATE,'MM') AND LAST_DAY(SYSDATE)
      ORDER BY a.date1 DESC, amount DESC
    WHERE rownum <= 10;

  • Sum columns of different record count in joined tables

    I have a problem with a query, please help.
    I have two tables:
    create table rec_a (key_code varchar(20),
                    TOT_AMT varchar(20),
                    INV_AMT varchar(20))
    create table rec_B (key_code varchar(20),
                    INVOICE_AMT varchar(20),
                   PAID_AMT varchar(20))
    insert into REC_A values (123123,  1168182.16, 1168182.16);
    insert into REC_B values (123123, 205699.04,205699.04);
    insert into REC_B values (123123,130912.78,130912.78);
    insert into REC_B values (123123, 81622.87,81622.87);
    insert into REC_B values (123123, 438032.43,438032.43);
    insert into REC_B values (123123, 159936.17,159936.17);
    insert into REC_B values (123123, 151978.87,151978.87);
    table 1
    KEY_CODE     TOT_AMT     INV_AMT
    123123     1168182.16     1168182.16
    table 2
    KEY_CODE     INVOICE_AMT     PAID_AMT
    123123      205699.04     205699.04
    123123      130912.78     130912.78
    123123      81622.87     81622.87
    123123      438032.43     438032.43
    123123      159936.17     159936.17
    123123      151978.87     151978.87
    I wrote a query to sum up all the fields (tot_amt,inv_amt,invoice_Amt,paid_amt)
    SELECT B.key_code,sum(A.invoice_amt),sum(a.paid_amt),SUM(b.tot_Amt),SUM(b.inv_amt) FROM rec_a B, rec_b A WHERE A.KEY_CODE=B.KEY_CODE AND B.KEY_CODE in ('123123')
    group by B.key_codeI got this:
    KEY_CODE     SUM(A.INVOICE_AMT)     SUM(A.PAID_AMT)     SUM(B.TOT_AMT)     SUM(B.INV_AMT)
    123123      1168182.16     1168182.16     7009092.96     7009092.96
    But I expected this
    KEY_CODE     SUM(A.INVOICE_AMT)     SUM(A.PAID_AMT)     SUM(B.TOT_AMT)     SUM(B.INV_AMT)
    123123      1168182.16     1168182.16     1168182.16     1168182.16
    Can anyone help me here?
    Thanks
    Edited by: 1003064 on Apr 29, 2013 3:19 AM

    Hi,
    welcome to the forum.
    Please read SQL and PL/SQL FAQ
    Particularly post CREATE TABLE and INSERT statement, describe the logic and post your expected output.
    When you put some code and/or output please enclose it between two lines starting with {noformat}{noformat}
    i.e.:
    {noformat}{noformat}
    SELECT ...
    {noformat}{noformat}
    It's also considered a good practice to mark questions as answered when the answers are satisfying your question or provide additional details.
    How does rec_a and rec_b tables relates to table1 and table2?
    It seems that yours is a very simple error. When you join 2 tables all the common rows get repeated.
    So without grouping your table will have something like this:table 1 table 2
    KEY_CODE TOT_AMT INV_AMT KEY_CODE INVOICE_AMT PAID_AMT
    123123 1168182.16 1168182.16 123123 205699.04 205699.04
    123123 1168182.16 1168182.16 123123 130912.78 130912.78
    123123 1168182.16 1168182.16 123123 81622.87 81622.87
    123123 1168182.16 1168182.16 123123 438032.43 438032.43
    123123 1168182.16 1168182.16 123123 159936.17 159936.17
    123123 1168182.16 1168182.16 123123 151978.87 151978.87
    Now sum up all the columns and you will understand why you get that result.
    Regards.
    Al
    Regards.
    Al
    Edited by: Alberto Faenza on Apr 29, 2013 12:17 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Javascript errors - Summing columns using Javascript

    Hi
    I have two regions on a page which are tabular forms that I have manually setup using APEX_ITEMS that I would like to use some JavaScript to pick up the values entered and sum that row up. I used Vikas example for tabular form calculation and it works perfectly for 1 region however if I have two regions it seems to give me the following error message in Firefox:
    g_table.rows[rownum].cells[getCellPos(g_table, html_GetElement("COL05"), "column")] has no properties
    Which I gather is because there are two columns on the page named COL05 and idea how I could get around this problem.
    I've put an example here: http://apex.oracle.com/pls/otn/f?p=35414:4

    Hello,
    It could be a bit difficult to auto sums a row, as
    usually rows include non-numeric columns. In any
    case you can always use a computation column in your
    select statement, or build a derived column in the
    report attributes tab. The problem is to update these
    columns in real-time, after a specific cell has been
    changed, and for that you need JavaScript.I realised this thats why I wanted to pickup the column and Row and then I would be able to replace the value in the specified column ie. total column using javascript for each row.
    I’m not sure I’m following you, but if you mean the
    current (active) rownum per displayed report page,
    you can use the #FIRST_ROW_FETCHED# and
    #LAST_ROW_FETCHED# substitution strings, in the
    footer of the report region.
    If you meant something else, please elaborate a bit
    more.Look at the revised demo app http://apex.oracle.com/pls/otn/f?p=35414:4 as you can see in this particular example each region returned 15 rows of data. I wondered if there was a way to pick up the last row returned so that I could use the same javascript function I use to calculate the rows I could update that specific column/total row. Example, in my demo app you will see a null row returned I would like to find this row then update the values.

  • Unable to sum column in ALV

    I am using REUSE_ALV_GRID_DISPLAY to produce an ALV report. I want to display the sum row for some of the columns but am unable to do so for some. Some work others dont.
    They are all of type MBEW-SALK3 CURR 13. When I click on the Total button for some of the columns, the message pops up 'Desired operation cannot be performed for column'. Any idea why this must be happening. do_sum is set to 'X' and no_sum set to space.

    Hi I think you have missed following things while preparing Field Catalog.
    Below are the fields to be maintained for the currency fields in field catalog.
    cfieldname     type slis_fieldname, " field with currency unit
    ctabname       type slis_tabname, 
    Try with it.

Maybe you are looking for

  • IDOC failure in R/3 Inbound processing

    Hi   I was able to successfully generate XML files from Syndicator, but when it comes for processing in R/3 side it get fails all the time with the IDOC err msg : "IDoc included in IDoc packet containing an error: transfer it separate ".   Kindly adi

  • I can't buy music anymore!

    And apparently Apple isn't worried that I can't spend money with them anymore. I tried contacting support, and got an email telling me to restart iTune, which clearly isn't fixing the problem, and now nothing. I suppose I should explain my problem..

  • GUI component services: Use static methods or query direct parent?

    Hi I have a large panel (covers most of the window) that contains a square grid of smaller panels. Each smaller panel contains a square grid of buttons. For instance, PnlGrid contains a few PnlGridSections and each PnlGridSection contains some BtnGri

  • Need Help:Reading Data from RU payroll cluster for table GRREC

    Hi... I need help on how to read data from RU cluster table for table GRREC for the employee & run date and get the value from structure PC292 . Please let me know about the includes and the import and export statements to be used. Thanks in advance,

  • Japan iphone to use in singapore

    Hi, I bought a iPhone 4 from Japan, can I use it in Singapore, using the local phone provider, M1?