Sum function not showing total

Hi,
i have to calculate sum under the report. when i use sum function it is not displaying adding total. Please let me know. How to calcuate sum?
Thanks,
lax

The sum function will work as long as you follow the rules in XPATH (check this out: http://www.w3schools.com/xpath/xpath_examples.asp)
So, basically it depends on 1) you XML data 2) conditions for the sum.
Assuming there are no conditions and that your xml data is flat then an example would be:
<?sum(//MYVALUE)?>
This will sum all elements MYVALUE in the XML data regardless of its position in the tree.
regards
Jorge

Similar Messages

  • Do not show total price of po in pdf print out

    Dear expert,
    i am going to make a print out of po but in po it shows item wise value, but not show total price at the end of item,this problem is
    particularly for this po only. please help to solve this issue

    Please check in table EKPO against fields NETWR, BRTWR - if the net value or gross value in this certain PO are populating or not.
    Regards,
    Ahmad Farhan Khalid

  • Sum() function not working properly. Instead of summing, its showing total count of the rows

    We have migrated one application from .net framework 1.0 to .net framework  2 (from Visual studio 2003 to Visual STUDIO 2005). Now after migration we are facing some problem related to the sum function in Crystal report 10. It is not working properly.
    So we migrated to Crystal report XI release 2 (though still using evaluation version for testing purpose), the problem is not yet resolved.
    The problem we are facing is while using the summary in the group field, it is showing the number of rows instead of the sum of the values.
    We have checked the same with min-max functions, and it is working properly with those.
    We have tried to make the sum by formula field. In such case, it is not showing any syntactical error but at execution time, it is throwing an error saying "A number field or currency amount field is required here".
    In the  the report the datatype of the field on which we are applying the sum function, is number, and in the table from where the data is fetched, the datatype is numeric(9,6).
    Any idea why sum function is not working ?
    I was browsing the net and saw running totals can be a work around for such summation issues in Crystal Report XI.
    Can you please provide insight of how to implement running totals for summation purpose in solving such issues.

    Hi,
    Running totals are more accurate than Summary Totals in Crystal.  Why? ...ask Crystal.  Anyway, just right click on Running Totals, create a new one, and enter you fields, etc. For group totals, it gives you a place to reset the totals for each group, etc.  Pretty self explainatory. 
    Jim

  • Sum function not working properly in Crystal XI. Its showing total count of the values

    We have migrated one application from .net framework 1.0 to .net framework  2 (from Visual studio 2003 to Visual STUDIO 2005). Now after migration we are facing some problem related to the sum function in Crystal report 10. It is not working properly.
    So we migrated to Crystal report XI release 2 (though still using evaluation version for testing purpose), the problem is not yet resolved.
    The problem we are facing is while using the summary in the group field, it is showing the number of rows instead of the sum of the values.
    We have checked the same with min-max functions, and it is working properly with those.
    We have tried to make the sum by formula field. In such case, it is not showing any syntactical error but at execution time, it is throwing an error saying "A number field or currency amount field is required here".
    In the  the report the datatype of the field on which we are applying the sum function, is number, and in the table from where the data is fetched, the datatype is numeric(9,6).
    Any idea why sum function is not working ?
    I was browsing the net and saw running totals can be a work around for such summation issues in Crystal Report XI.
    Can you please provide insight of how to implement running totals for summation purpose in solving such issues.

    Are you seeing this happen in the Crystal designer as well, outside of any .NET application?

  • Report Painter not showing totals for some cells

    Hi,
    We're developing a report painter that will give us a total of all the columns. This total uses a set of variables and a set which essentially is a grouping of the profit centers. The problem is it is not showing any value on the cell. Despite the individual accounts having some values.
    Any ideas where could this gone wrong ? the set exist with the correct accounts.
    I.e.
                                    A1            A2           TOTAL (A1 + A2 - defined in set)
    Depreciation            100          100          200 [ but this shows blank]

    how did you solve this problem,my financial statement is not reflecting total posted depreciation even though it is reflecting the depreciation in the indididual G/L accounts.

  • Why does the sum function not work when I try to add a column of decimal numbers?  The value is always returned as 0.  No problem with whole numbers but decimals do not work!

    just bought a MacBook Air and using Numbers to make a spreadsheet for financial purposes.  The sum function is working ok for whole numbers but when I try to sum a column of 2 decimal place numbers the result always comes back as 0.  Can anyone help?

    Hi laura,
    I suspect that your 2 decimal place numbers are formatted as text. Change the format of the column to currency and see it that works.
    Also You might want to update your profile to reflect your current systems!
    quinn

  • Sales Analysis Item Tab Function Not Showing Orders Dollars

    Hello Gurus of SAP B1.
    This pertains to SAP B1 SP 00 PL 16 Version 8.8. 
    While doing the Sales Analysis function under Sales A/R > Sales Reports > Sales Analysis > Item Tab, the system does not report on the dollars for the day when I select "Orders" or "Delivery Notes'.  The system does display the proper dollars when I select "Invoices" on the "Item" Tab. 
    And the "Invoices" and "Orders" and "Delivery Notes" buttons display correct dollars on the other tabs for Customer and Sales Employee...so why not on the "Items" tab???
    Does anyone know why this might be happening and/or how to fix this???
    Thanks in Advnace - Zal

    Thanks for the quick reply Gordon - hope things are continuing to go well in your new endeavors &;-D
    Well that is really strange that items is handled that way - I have created SQL to get the results but I always like to balance out to what SAP B1 is reporting.  My SQL detail and grand totals are fine by Customer and I have been able to reconcile in that manner, but wanted to reconcile by items also.  I am certain I have done it before in SAP 2007A...
    Has there been a change to the item/sales order table in Version 8.8???
    Take care my FFF - Zal

  • PL/SQL function not showing DMBS_OUTPUT.PUT_LINE result

    I have compiled a function and when I call it, the DMBS value is not shown.
    I have set serveroutput on
    I am using 9i.
    The function completes and provides a result:
    SQL> select textrawio.HEXTONUM('0D') from dual;
    TEXTRAWIO.HEXTONUM('0D')
    13
    The script:
    CREATE OR REPLACE PACKAGE BODY textrawio
    AS
      FUNCTION hextonum(v_hex VARCHAR2) RETURN NUMBER
      IS
        hex          VARCHAR2(4);
        num          NUMBER;
        num1         NUMBER;
        num2         NUMBER;
      BEGIN
    dbms_output.put_line ('hello');
        hex := SUBSTRB(v_hex,1,1);
        IF ( hex >= '0' and hex <= '9' ) THEN
          num1  := TO_NUMBER(hex);
        END IF;
        IF hex = 'A' TH...Any ideas from this snippet?
    I have never had a prob with DBMS_OUTPUT previously.
    There is no DMBS_OUTPUT_GET_LINE code.

    The full PL/SQL is
    CREATE OR REPLACE PACKAGE TEXTRAWIO
      IS
      FUNCTION tidblobchar(v_object_id char) RETURN VARCHAR2;
    END; -- Package Specification TEXTRAWIO
    SET SERVEROUTPUT ON
    CREATE OR REPLACE PACKAGE BODY textrawio
    AS
      FUNCTION tidblobchar(v_object_id char) RETURN VARCHAR2
      -- This function converts the long raw column of TIDBLOB to
      -- its character representation for manipulation.
      -- It can only be called for an object type of T.
      IS
        raw_data          LONG RAW;
        rawlen            NUMBER;
        hex_data          VARCHAR2(32760);
        char_data         VARCHAR2(32760);
        loop_counter      NUMBER;
      BEGIN
        -- Get the blob using the rowid passed in.
        -- Will always retrun only one row.
    dbms_output.put_line ('1');
        SELECT data
          INTO raw_data
          FROM ifsapp.client_profile_load
         WHERE v_object_id = rowid;
    dbms_output.put_line ('2');
        -- Convert the raw data to hex.   
        hex_data := rawtohex(raw_data);
        rawlen := length(hex_data);
        loop_counter := 1;
    dbms_output.put_line ('3');
        -- Loop through and convert the hex to characters.
        WHILE loop_counter <= rawlen LOOP
            char_data := char_data || CHR(to_number(SUBSTRB(hex_data,loop_counter,2),'xx'));
            loop_counter := loop_counter + 2;
        END LOOP;
        RETURN char_data;
      END;
    END;
    /Both parts compile but when I run it:
    SQL> select
      2  user_name, profile_name, data_length, textrawio.tidblobchar(rowid) data, timestamp
      3  from ifsapp.client_profile_load
      4  where data is not null
      5  ;
    user_name, profile_name, data_length, textrawio.tidblobchar(rowid) data, timestamp
    ERROR at line 2:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "IFSAPP.TEXTRAWIO", line 18I was hoping to use DBMS_OUTPUT to find which is the actual line having the error and later, what values it was dealing with.
    Thanks

  • SUM function not working correctly (not a rounding issue)

    OK.
    So in the E-column, I have a list of statistics going from E4 through E11. E12 is supposed to give the sum of the preceding numbers within that range.
             E
    4     34000
    5      7000
    6      7000
    7    30500
    8      7000
    9      3000
    10          0
    11    1500
    The sum of these numbers should appear in the next row, E12, where I have the formula: "SUM E4:E11". However, whereas E12 should be giving me $91,000, it's instead giving me $57000. There's nothing that I can see that is wrong with my formula. If I modify one of the cell amounts, the 57000 will change by the amount I changed the cell. But there's no reason on earth it should be giving me 57000. I thought maybe there is an issue with how large a cell number can be, but if I change the 0 to a 1 in E10, it outputs 57001 to E12.

    I cannot confirm your problem.
    When I add: "34000+7000+7000+30500+7000+3000+1500" in the spotlight (top right of the menu bar),  the total of is 90,000
    Using Numbers, I also get 90,000
    =SUM(E1:E8)
    There is something wrong with your data.
    Please post a screenshot

  • Alternatives to "Hiearchy node does not show total of nodes & leaves"

    Greetings,
    I am having a problem with a query I created and am looking for suggestions on how to get around my problem.  The problem is a classic one that I have seen numerous times on various discussion boards.
    InfoCube Definition
    Dimensions
       Material (M)
       Value Type (V)
    Key Figures
       Quantity (Q)
       Amount   (A)
    Restricted KF
       Actual Quantity (AQ)      {Q where V = 'A'}
       Actual Amount (AA)        {A where V = 'A'}
       Planned Quantity (PQ)     {Q where V = 'P'}
       Planned Amount (PA)       {A where V = 'P'}
    Calculated KF
       Planned Cost (PC) = PA / PQ
       Planned Value (PV) = PC * AQ
    The Problem
    The query I wrote is reporting on Material using a hierarchy that was defined.  The problem, that's a classic, is that the lower nodes of the hierarchy do not roll up to the upper node for the Planned Value (PV).
       Example:
    ____________AQ____AA____PV____PQ____PA____PC
       Level 1_______30___$50___$ 9___200___$60___.30
       __Level 2.1___10___$20___$ 1___100___$10___.10
       __Level 2.2___20___$30___$10___100___$50___.50
    In the above example, the value for PV at Level 1 should be $11 (which is the sum of the lower nodes) and not $9 (which is the result of the calculation being performed on the Level 1 row).
    Alternatives Explored
    I have explored the following alternatives in order to provide a solution to this problem:
    - Aggregation problems with hierarchies is documented in SAP Note 789404.
    - I tried creating the CKF as a formula in the query and setting the "Calculate Result As" option to "Summation" but hierarchy nodes are not the same as result rows.
    - I attempted to set the "Time of Aggregation" option in the CKF to "Before Aggregation" but because of how we are modeled I need to use a RKF in the calculation.  Because of this the CKF formula is regarded as complex and therefore I do not have the option to adjust this parameter.  (See Re: Incorrect Results Row)
    - My last attempt was to investigate the use of Virtual Key Figures.  From what I have seen, this will not provide me with the solution I need either.  (See Virtual Characterstics and Key Figures)
    Question
    Short of changing my data model and/or calculating and storing the result in the cube, is there any other solution to my problem?
    Your feedback, great or small, is much appreciated.
    Thanks in advance,
    Brian

    EventQueu.invokeLater();From where do you call this?
    We may need to see a small example code that can reproduce the problem.

  • Satellite C855-2F3 is not showing total memory

    I have a Satellite C855-2F3 running win8 64bit. It has 8gb ram installed but it is currently only showing 2gb.
    What could cause this/resolve this?

    Sorry, yes, it was late and I was tired, problem has been solved now. I had to clean the cooling system out today and when I put the laptop back together it now shows 6gb, it may have just come lose.
    Thanks.

  • SAPSCRIPT-FORMPAGES does not showing total no of pages

    Hi,
    I want to diaplay page numbers if only pages are more than 1.so i write logic like below.
    if &PAGE& ne &SAPSCRIPT-FORMPAGES&
    &PAGE&
    ENDIF.
    but it is not working..in the first page SAPSCRIPT-FORMPAGES also contain value 1.
    Can any one suggest solution.
    Thanks.

    Hi,
      Could you please update on how did you solve this issue? here we are getting similar issue in one of the form.
    Thanks.

  • Implicit ORM relationship functions not showing?

    Hi all,
    I have the following relationship defined in an ORM object called "Person":
    <cfproperty name="addresses"
      singularname="address"
      type="array"
      fieldtype="one-to-many"
      cfc="extranetCFC.aro.extranet.address.Address"
      inverse="true"
      lazy="true"
      cascade="all-delete-orphan"
      fkcolumn="person_id" getter="true" setter="true">
    When I do an EntityLoad on a person, and it grabs a valid person, and then call "getAddresses" on the loaded person it gives me an error saying the method "getAddresses" cannot be found.  Anyone have any ideas?  I tried this with and without the fkcolumn and the getter and setter attributes on the relationship.  I tried restarting ColdFusion to make sure everything was cleared out.  Thanks.

    Hi all,
    I have the following relationship defined in an ORM object called "Person":
    <cfproperty name="addresses"
      singularname="address"
      type="array"
      fieldtype="one-to-many"
      cfc="extranetCFC.aro.extranet.address.Address"
      inverse="true"
      lazy="true"
      cascade="all-delete-orphan"
      fkcolumn="person_id" getter="true" setter="true">
    When I do an EntityLoad on a person, and it grabs a valid person, and then call "getAddresses" on the loaded person it gives me an error saying the method "getAddresses" cannot be found.  Anyone have any ideas?  I tried this with and without the fkcolumn and the getter and setter attributes on the relationship.  I tried restarting ColdFusion to make sure everything was cleared out.  Thanks.

  • COUNT() and SUM() function it not working in XDO file.

    Hi ,
    I am getting one error. Count and sum function not working proper.
    For example :
    Department 10 have 3 employee and total salary is 8750. But my report returning total employee 1 and total salary 5000
    10
    Ename Sal
    KING 5000
    CLARK 2450
    MILLER 1300
    ==================
    total employee : 1
    total salary : 5000
    Kindly help me solve this problem.
    <dataTemplate name="TEXT">
    <properties>
    <property value="upper" name="xml_tag_case" />
    </properties>
    <lexicals>
    </lexicals>
    <dataQuery>
    <sqlstatement name="Q_TEMP">
    <![CDATA[SELECT DEPTNO,DNAME,LOC FROM DEPT]]>
    </sqlstatement>
    <sqlstatement name="Q_TEMP1">
    <![CDATA[SELECT ENAME,HIREDATE,SAL FROM EMP WHERE DEPTNO = :DEPTNO]]>
    </sqlstatement>
    </dataQuery>
    <datastructure>
    <GROUP name="G_1" source="Q_TEMP">
    <element value="DEPTNO" name="DEPTNO" />
    <element value="DNAME" name="DNAME" />
    <element value="LOC" name="LOC" />
    <GROUP name="G_2" source="Q_TEMP1">
    <element value="ENAME" name="ENAME" />
    <element value="SAL" name="SAL" />
    <element value="G_2.ENAME" name="TOTL_DETAILS" dataType="number" function="COUNT()" />
    <element value="G_2.SAL" name="TOTL_SAL" function="SUM()"/>
    </GROUP>
    </GROUP>
    </datastructure>
    </dataTemplate>
    Thanks
    Yudhi

    Please have the data structure as below:
    <datastructure>
    <GROUP name="G_1" source="Q_TEMP">
    <element value="DEPTNO" name="DEPTNO" />
    <element value="DNAME" name="DNAME" />
    <element value="LOC" name="LOC" />
    <GROUP name="G_2" source="Q_TEMP1">
    <element value="ENAME" name="ENAME" />
    <element value="SAL" name="SAL" />
    *</GROUP>*
    *<element value="G_2.ENAME" name="TOTL_DETAILS" dataType="number" function="COUNT()" />*
    *<element value="G_2.SAL" name="TOTL_SAL" function="SUM()"/>*
    *</GROUP>*
    </datastructure>
    Aggregate functions to be placed at the level you require it. Here you need at G_1, so place it there.

  • Device summary pane does not show capacitiy totals for each category (audio, remaining, photos, etc.)

    When viewing the summary pane for my ipod, the summary bar does not show totals for each category (audio, remaining, photos, etc.). It does not show when hovering over each category either. Seems to be some type of bug with itunes. I have tried re-installing itunes but that does not work. How do I fix this?

    Hello vetsrini.
    Thanks a lot for your kind reply. As i said, i'm new to this and sometimes i just cannot pass over some problems. Here are the fields i have inserted:
    <?for-each:LIST_G_SETUP/AS_OF_DATE?>
    <?end for-each?>
    <?for-each@section:G_CUST_INV?>
    <?for-each:G_1?>
    <?INVNUM?>
    <?INVOICE_TYPE_INV?>
    <?DUE_DATE_INV?>
    <?sum (C_INV_BALANCE)?>
    <?sum (C_INV_B0)?>
    <?sum (C_INV_B1)?>
    <?sum (C_INV_B2)?>
    <?sum (C_INV_B3)?>
    <?sum (C_INV_B4)?>
    <?sum (C_INV_B5)?>
    <?end-for-each-group?>
    <?TOTAL_INV_AMT_DSP?>
    <?TOTAL_INV_B0_DSP?>
    <?TOTAL_INV_B1_DSP?>
    <?TOTAL_INV_B2_DSP?>
    <?TOTAL_INV_B3_DSP?>
    <?TOTAL_INV_B4_DSP?>
    <?TOTAL_INV_B4_DSP?>
    <?end for-each:G_CUST_INV?>
    In the header of the template i also have <?CUST_NAME_INV?> and the report date. When i try to enter the <?AS_OF_DATE?> it is not printed and also the header is not shown any longer. Once again, thank you for any help,
    Octavio

Maybe you are looking for