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.

Similar Messages

  • Radio button and associated functionality is not working!

    Hi Pros,
    I am facing the following problem:
    1.I have an interactive PDF created in Acrobat 9 Pro.
    2.PDF have few radio buttons, each radio buttons ahave assigned valus(eg: 1,2,3 etc)
    3.I have a text box in which the value of selected radio button is displayed.
    4.PDF is working fine on my machine.
    5.Client is having Internet Explorer version 7.0.5 and Adobe reader:8.2.6
    6.The radio buttons and associated functionality is not working on client's machine.
    7.The text box shows '0' even if we a radio button with value 2 or 1 is selected.
    What will be the problem? How can I fix this issue?
    Please help.

    Thanks alot for helping me on this.
    Thanks to u also ~graffiti

  • My copy and paste functions are not working, does anyone know why this might be happening?, my copy and paste functions are not working, does anyone know why this might be happening?

    my copy and post functions are not working, does any one know why this may be happening and what I could do to fix it? Thanks!

    Have you tried rebooting?

  • My copy and paste functions are not working properly since iOS 8 update

    Ever since I updated to iOS 8 on my iPhone 4s the copy and paste function isn't working. It'll work the first time but any time I copy something else it pastes the first thing I copy. The only fix I've found is rebooting the phone but that is a pain to do every time I want to copy something and should be very unnecessary. I updated to 8.0.2 but that didn't fix it.

    Have you tried rebooting?

  • Display has white and grey lines and blocks crisscrossing it and touch functions are not working properly on half the screen.

    I dropped my iPhone 5S and it landed flat on it's face (it was in a protective case).  Since then my touch screen display is not working properly. I have white and grey lines and/or blocks crisscrossing the screen both horizontally and vertically.  Screen responds to touch in odd random ways, but rarely does what I am trying to do.  Can't call or receive calls because can't dial or answer phone via swipe. Can't text or read incoming texts. All functions seem to be working except that I can't access them because the touch screen is acting up. If I move the phone around it randomly accesses different apps or functions, but I have no control over them once the appear on the screen.  Touching screen just causes phone to randomly choose something else to open.  What have I damaged?

    Shanegang77 wrote:
    What have I damaged?
    We cannot possibly tell. Obviously some hardware inside. Take it in to an Apple Store. They will offer you the opportunity to swap the phone for $269 in the US. Prices vary by country.

  • My Copy and Paste Function is not working

    I recently upgraded to Firefox 16.02 and everything worked fine for a while but last night out of the blue my copy and paste function stopped working. As far as I know I have not done anything different. My copy paste function still works in Chrome and IE.
    I have uninstalled/reinstalled Firefox and that did not solve the problem. As we speak I am running an AV scan and I also cleared the web cache and what not in Firefox. Ran it in safe mode... nothing seems to work!
    Interestingly though, when I went to Copy and Paste the "trouble shooting info" from the clipboard to here on this page it worked fine.

    For problems copying the results of Google translations, see these threads:
    * [https://support.mozilla.org/en-US/questions/940979 i can't copy translate from google traslator, ctrl-c ctrl-v don't work]
    * [https://support.mozilla.org/en-US/questions/940871 Can't copy translated text from Google Translate web page?]

  • Regular measures(measures with SUM function) are not working along Distinct count measures

    Hi All,
    I am creating a cube that got to have a distinct count measure and a sum measure. if i have created only sum measure then it is working fine. if i create both measures and process the cube only distinct count measure is populated. the sum measure is showing
    all blank values. i am using 2008 R2, and creating 2 different measure groups for both measures, after i include the distinct count measure the sum measure becoming null. can you please help me with this? i am breaking my head for last 2 days on this.. Thank
    You

    Ramesh, measures are affected by the context of the queries that contain them, for example and in some cases, you can get a different total count of something by two different queries, this is because the context of the first query is different than
    the second one ... keep this in mind.
    Now, I've noticed that you are "creating 2 different measure
    GROUPS for both measures", and i guess that you are trying to view those two measures _which are from different measure
    groups_ at the same time and in the same report.
    considering the info in the first point and as you are create the calculated measures in two different measure
    groups, I'm not sure but i guess that this is the problem, and i suggest you create those two calculated measures
    in the same measure group, then try to view them again and let's see.
    if the previous point didn't solve it, please post the expressions you are using to create the calculated measures, maybe this will help in finding the problem.  

  • Count and sum function

    Hi,
    I want to get sum of a column, but it is giving wrong values when using sum and count functions. please help.
    But in actual excel value is different.

    Hi,
    Below is the derived table query:
    select location,
    SUM(case when priority='1'and sholders like '%niit%'then 1 else 0 end) as 'Total P1callsof NIIT',
    SUM(case when Priority='1'and sholders like '%niit%'and sla_violation=0 then 1 else 0 end) as 'TotalResolvedcallsinBHRS NIIT'
    from Stakeholders group by Location
    Am calculating the sum of 'Total P1callsof NIIT' in a summary page, which gives me incorrect value(2349) where the actual count is 581. .

  • Portege R100 and Linux - Function Keys Not Working and Latest BIOS?

    Hi everyone,
    I have a Portege R100 (PPR10L-13G10P). I'm trying to install Linux and when attempting to access the function keys (F6) the computer doesn't allow me to... any ideas why?
    Also what is the latest BIOS version for this computer? And where can it be downloaded?
    Thanks in advance!
    Terrence

    Hi
    At first I must say that Toshiba doesn't support Linux in general so you are alone with this problem.
    Hopefully someone will be able to assist you a bit.
    If you want to find out the latest BIOS version just enter BIOS settings and check it out.
    Newer BIOS version will not help you at all so my opinion is that you should not change anything.
    Anyway, bio download page is - http://www.toshiba.eu/innovation/download_bios.jsp
    F keys functionality is on Windows supported by special designed tool and it works under Windows only.

  • Sum function do not work in oracle reports enhanced spreadsheet format

    we are using oracle reports 10.1.2.3 in our oracle application server 10gr2 and we are creating enhanced spreed sheet.And the report opens in MS excel fine.But we can not apply any formula like VALUE,SUM,AVG on that report after opening it into excel.First we thought that it may be because of the comma in the number filed.we removed that comma from the filed but t still gives the error "Error in value"

    Hi,
    I hope you already solved this problem, I had the same issue after spending an hour I found the workaround, this is just for the guys who experience the same issue. Try to format your number columns either at database level(not via Report builder property palette) with TO_CHAR(...) OR use this Format Mask at Report level to format your numbers -NNNGNNNGNN0D000(negative sign must be there to avoid space in output Excel).
    Hope it helps,
    Regards,
    Syed Khawar

  • Copy and Paste function is not working in FFv23

    I cannot place cursor and choose content to copy. Cursor scrolls and will not allow me to highlight.

    Did this - didn't work.

  • Cut and paste functionality does not work

    hello,
    i did upgrade to quicktime 7 pro on windows xp.
    I do now have selection possibilities and export possibilities but i'm unable to cut and past selections. Functionalities stay grey in my menu. I did read the manual, followed the steps (made a selection) but still nothing.
    When i make a selection it doesn't export my selection only eather, it exports my whole movie, the same with saving?
    any idea here? It's urgent. thanks, wendy

    QuickTime Pro can't edit muxed file formats (MPEG 1 or 2 and Flash).
    Use MPEG Streamclip (free) to edit your .mpg files.

  • Count and Sum running total

    Can i sum and couunt running total in formula?.
    Please let me know.

    Hey, we can do count and sum functions in Running total.
    These functions are available in crystal reports for  summary fields.
    We can create  the running total based on the type of summary like Sum, count, max, min, distinct count, etc.
    We can do Evaluation for each record or on group or on each field  and also be done by writing a formula.
    We can  do count or sum by manual running total by writing a formula in the formula workshop.
    Based on our requirement we can use both functionalities.
    Please let me know  if you have any queries.
    Regards,
    Naveen.

  • The download function is not working....!! When I click on something like download a doc,pdf or any such file, the firefox just doesn't respond, and when I checked the download, i.e. cntrl+j, I don't find anything in the downloads...

    The download function is not working....!! I don't use any add-ons like idm or dap,etc.... When I click on something like download a doc,pdf or any such file, the firefox just doesn't respond, and when I checked the download, i.e. cntrl+j, I don't find anything in the downloads... I am currently using Firefox 7.0.1....... Nothing is being downloaded, and I am forced to use IE8 for everything... I even tried re-installing, but doesn't help... I am using Windows 7

    TonyE is correct the plugin version comes with Adobe's Reader X.
    The failure in communication is two parted:
    1. Reader X is not Acrobat (Mozilla Plugin Checker)
    2. Acrobat is not mentioned in the Reader X download Page (Adobe)
    therefore confused clients.
    For readers '''CAUTION''' check the minimum requirements for Reader X.
    Here: [http://www.adobe.com/products/reader/tech-specs.html Adobe's Reader X requirements link]
    Do not waste the time to download (80+MB and Site is Slow) if your machine does not have the resources to execute it. ie. '''aging''' Hardware
    Unfortunately the Adobe DLM only checks the requirements after it has
    downloaded BEFORE the install occurs.
    This is '''very expensive''' for both the sender and receiver
    It might be why they called it READER X and READER 9 will not sense an update...
    Another Software company pushing Hardware antiquity...

  • How can I sum up raws? the sum function seems to work for columns only and right now I have to create a separate formula for each raw

    How can I sum up raws? the Sum function seems to work only on columns. Right now I have to create a separate formula for each raw

    Hi dah,
    "Thanks, but can I do one formula for all present and future raws? as raws are being added, I have to do the sum function again and again"
    You do need a separate formula for each group of values to be summed.
    If the values are in columns, you need a copy of the formula for each column.
    If the values are in rows, you need a copy of the formula for for each row.
    If you set up your formulas as SGIII did in his example (shown below), where every non-header row has the same formula, Numbers will automtically add the formula to new rows as you add them.
    "Same formula" in this context means exactly the same as all the formulas above, with one exception: the row reference in each formula is incremented (by Numbers) to match the row containing the formula.
    Here the formula looks like this in the three rows shown.
    B2: =SUM(2)
    B3: =SUM(3)
    B4: =SUM(4)
    That pattern will continue as rows are added to the table.
    Also, because the row token (2) references all of the non-header cells in row 2, the formula will automatically include new columns as they are added to the table.
    Regards,
    Barry

Maybe you are looking for