Avg function in xml report

Hi all I have developed a matrix xml report which is giving out put as below .
deptno      edp         account
10            5000        25000
20            20000      130000
30            35000       160000
         (avg) value       avg value)how to get this average value of edp dept and average value of account dept?
I developed the report but I was strucked in to get average value .
Kindly help me
thanks for all in advance.

look at
https://blogs.oracle.com/xmlpublisher/entry/averaging_your_totals
or try
<?avg(//edp)?>-add
or by formula
<?for-each-group: ROW;’Q’?>
<?sum(current-group()/edp) div count(current-group()/edp)?>
<?end for-each-group?>output: 20000
Edited by: AlexAnd on Nov 19, 2012 12:06 AM

Similar Messages

  • XML Report Publisher program is erroring out

    Hi All,
    I've customized the AR Customer Statements.
    I've created a data definition as "ARXSGP" and uploded the sample_output.xml of Statement Generation Program to it. Also I've created a Data template as "ARXSGPO" and attached the data definition "ARXSGP" to it and uploaded the customized rtf file "XXHCC_CLE_F_ARCUSBALSL.rtf" and set the default output type to PDF.
    As I donot wish to call the XML Report Publisher program manually every time when I Print the Statements through Print Documents-->Statements.
    So I've done the below customization in ARXSGP.rdf file ie; Print Statements Report which is an Oracle Report.
    I've added the below code in After Report trigger.
    =======================================
    FUNCTION AfterReport
    RETURN BOOLEAN
    IS
    BEGIN
    Below code added for Customer Statement Case Study
    DECLARE
    l_req_id NUMBER := 0;
    L_XML_LAYOUT BOOLEAN := TRUE;
    BEGIN
    L_XML_LAYOUT := FND_REQUEST.ADD_LAYOUT (TEMPLATE_APPL_NAME => 'AR', TEMPLATE_CODE => 'ARXSGP', TEMPLATE_LANGUAGE => 'en', TEMPLATE_TERRITORY => 'US', OUTPUT_FORMAT => 'PDF');
    IF L_XML_LAYOUT THEN
    srw.message(20001, 'Template is picked ');
    srw.message(20002,'Concurrent request Id : '||:p_conc_request_id);
    l_req_id := FND_REQUEST.SUBMIT_REQUEST('XDO',
    'XDOREPPB',
    NULL,
    NULL,
    FALSE,
    :p_conc_request_id,
    222, -- Receivables
    'ARXSGPO', -- Statement Generate
    'en-US', -- English
    'N',
    'RTF',
    'PDF');
    IF l_req_id > 0 THEN
    COMMIT;
    ELSE
    srw.message(20004, 'Failed to submit request');
    END IF;
    ELSE -- Not L_XML_LAYOUT
    srw.message(20005, 'Template is not picked ');
    END IF;
    END;
    --------------------Code Ends----------------------------
    SRW.USER_EXIT('FND SRWEXIT');
    RETURN (TRUE);
    END;
    ==============================================
    After Printing the Statements through Print Documents-->Statements
    Statement Generation Program is being called and later XML Report Publisher program is also being invoked.
    But the XML Report Publisher Program is erroring out with below error.
    XML Publisher: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XDOREPPB module: XML Report Publisher
    Current system time is 03-SEP-2012 17:42:18
    Oracle XML Publisher 5.6.3
    java.lang.NumberFormatException: For input string: "ARXSGPO"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
         at java.lang.Integer.parseInt(Integer.java:447)
         at java.lang.Integer.parseInt(Integer.java:497)
         at oracle.apps.xdo.oa.cp.JCP4XMLPublisher.runProgram(JCP4XMLPublisher.java:215)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    Output file size:
    0
    ------------- 1) PUBLISH -------------
    Disabling requested Output Post Processing. Nothing to process. The output of the request is zero byte.
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 03-SEP-2012 17:42:22
    Please help out with a solution.
    Thanks,
    Tech D

    for r12 add one row for parameter "Dummy for Data Security" from desc of XDOREPPB
    follow works for me
    SQL> set serveroutput on
    SQL>
    SQL> declare
      2    v_request_id   number;
      3  begin
      4 
      5   begin fnd_global.apps_initialize(0, 20419, 0); end;
      6   v_request_id := FND_REQUEST.SUBMIT_REQUEST('XDO',
      7                                              'XDOREPPB',
      8                                              NULL,
      9                                              NULL,
    10                                              FALSE,
    11                                              'N', -- Dummy for Data Security
    12                                              9888637, -- Request
    13                                              0, -- Template Application
    14                                              'XXAND10_1', -- Template
    15                                              'en-US', -- Template Locale
    16                                              'N', -- Debug Flag
    17                                              'RTF', -- Template Type
    18                                              'RTF' -- Output Format
    19                                              );
    20 
    21    dbms_output.put_line(v_request_id);
    22    if v_request_id > 0 then
    23      dbms_output.put_line('successfully submitted.');
    24      commit;
    25    else
    26      dbms_output.put_line('not submitted.');
    27      rollback;
    28    end if;
    29 
    30  end;
    31  /
    9888651
    successfully submitted.
    PL/SQL procedure successfully completed
    SQL> 'Y' for "Dummy for Data Security" also works for me
    SQL> declare
      2    v_request_id   number;
      3  begin
      4 
      5   begin fnd_global.apps_initialize(0, 20419, 0); end;
      6   v_request_id := FND_REQUEST.SUBMIT_REQUEST('XDO',
      7                                              'XDOREPPB',
      8                                              NULL,
      9                                              NULL,
    10                                              FALSE,
    11                                              'Y', -- Dummy for Data Security
    12                                              9888637, -- Request
    13                                              0, -- Template Application
    14                                              'XXAND10_1', -- Template
    15                                              'en-US', -- Template Locale
    16                                              'N', -- Debug Flag
    17                                              'RTF', -- Template Type
    18                                              'RTF' -- Output Format
    19                                              );
    20 
    21    dbms_output.put_line(v_request_id);
    22    if v_request_id > 0 then
    23      dbms_output.put_line('successfully submitted.');
    24      commit;
    25    else
    26      dbms_output.put_line('not submitted.');
    27      rollback;
    28    end if;
    29 
    30  end;
    31  /
    9888652
    successfully submitted.
    PL/SQL procedure successfully completed
    SQL>

  • Failure chain in xml report is missing

    The failure chain within the xml report is longer coming up in the report. Where is this option set or how to insure it is functioning properly.

    Hi,
    Go to Configure » Report Options and enable Include Step Results. 
    Rohama K.

  • Generate XML report using MAX Generate report.vi

    Hi All,
    Caught in simple and wierd problem. I'm using a simle VI called MAX Generate Reoprt.vi to generate an XML report but getting error
    Error code -2147220553
     Error description :Incorrect report file extension provided.
    The image of the block diagram is attached. I'm able to generate HTML reoport from MAX(absolutely no probs).
    Thanks in advance
    Regards
    VDC
    Attachments:
    Error_in_MAX.JPG ‏7 KB

    You must have the correct file extention. Here's what is wirtten in the detailed help of the function:
    output filename specifies the filename of the generated report.
    You must have the correct extension for the type of report to generate (.xml, .htm, .html, or .zip).
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Xml report getting errored out

    hi friends
    i have one custom xml report with ten parameters whenever i submiteing concurrent program with mandatory paramas it will getting succesfully completed
    without requirement out put. Again whenever i submiteed program with mandatory params and non mandatory parameters it will getting errored out .
    the error was below
    Enter Password:
    MSG-01275: Date select AND afrm.certificate_date BETWEEN :P_FROM_DATE and :P_TO_DATE
    01-OCT-11 31-DEC-11
    REP-1276: Placeholder 'CP_PARENT_NAME' references one or more non-formula columns.
    REP-0069: Internal error
    REP-57054: In-process job terminated:Terminated with error:
    REP-1276: Placeholder 'CP_PARENT_NAME' references one or more non-formula columns.
    thanks
    chandra

    Hi Chandra,
    There might be a problem with your .rdf.
    Please check the formula column and use srw.message functionality to debug.
    And please enable Trace option while you are running the report.
    So that you can get more info about the errors.

  • Help-XML report which uses XSL-FO and XSL-FO contains OAF VO

    Hello All,
    I want to know functionality of one XML report developed by Oracle.
    From one oracle form after clicking one button, it is populating PDF file output of report to open.
    Here is what Oracle has done to achieve this:
    On the click of button on oracle form, it is calling one OAF form. (fnd_function.execute(function_name=> 'ONT_PRINT').
    This OAF form contains nothing on its layout. One CO (File is attached) and AM is attached to this OAF page.
    In CO, may be it is somehow it is calling RTF file.
    I got the RTF file from XML publisher, RTF imports one XSL-FO (ONTBSAEXSL is a Template of XSL-FO type in Oracle apps in XMP Publisher administrator responsibility) file using <?import:xdo://ONT.ONTBSAEXSL.en.00/?>
    In the XSL file, OAF View Objects has been used like,
    <xsl:variable name="LinesVO" select="/*/HeaderVO/HeaderVORow/LinesVO/LinesVORow"/>
    What is the meaning of " /*/HeaderVO/HeaderVORow/LinesVO "? Does it mean LinesVO is getting called by HeadersVO. But in OAF this never happens.
    I want to add some columns in the RTF from LinesVO. But "Unit price" is not available in LinesVO.
    Do I need to extend this VO in JDeveloper and upload the .JPX and extended VO files?
    I have done extending the VO, but no use..
    So,
    In short my question is,
    If I extend the VO LinesVO by XXLinesVO, then will this <xsl:variable name="LinesVO" select="/*/HeaderVO/HeaderVORow/LinesVO/LinesVORow"/>
    statement in XSL-FO use my XXLinesVO or LinesVO?
    Regards,
    Parag

    I want to customize one RTF template by adding some columns. This RTF imports one XSL-FO stylesheet.
    RTF has tags like <?for-each:/*/HeaderVO/HeaderVORow/LinesVO/LinesVORow?>
    and XSL file has tags like <xsl:variable name="InternalOrgName" select="/*/HeaderVO/HeaderVORow/InternalOrgVO/InternalOrgVORow/Name"/>
    If I want to add one colun in LinesVO, what are all things I need to do?
    I customized it by adding the new columns through JDeveloper and extending the VO's and substituting them, importing JPX and bounced apache.
    But the XSL-FO file is very strange (attached herewith). Those changes are not reflecting in report even after extension.

  • XML Report not working

    Hi All,
    I developed a xml report but it is throwing below error..please help..
    the log details are below
    Shipping Execution: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XXTEST_XML module: XXTEST1
    Current system time is 18-JAN-2012 13:01:05
    XDO Data Engine Version No: 5.6.3
    Resp: 21623
    Org ID : 204
    Request ID: 5929328
    All Parameters: P_org_id=207:P_phys_inv_id=5196
    Data Template Code: XXTEST_XML
    Data Template Application Short Name: WSH
    Debug Flag: N
    {P_org_id=207, P_phys_inv_id=5196}
    Calling XDO Data Engine...
    [011812_010109165][][ERROR] Variable 'P_phys_inv_id' is missing....
    [011812_010109165][][EXCEPTION] java.sql.SQLException: ORA-06550: line 2, column 18:
    PLS-00103: Encountered the symbol "." when expecting one of the following:
    ( - + case mod new not null <an identifier>
    <a double-quoted delimited-identifier> <a bind variable>
    continue avg count current exists max min prior sql stddev
    sum variance execute forall merge time timestamp interval
    date <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternatively
    Am posting xml also
    <dataTemplate name="XXTEST_XML" >
         <parameters>
              <parameter name="P_org_id" dataType="character" />
              <parameter name="P_phys_inv_id" dataType="character" />
              <parameter name="P_REPORT_NAME" dataType="character" defaultValue="XXTEST_XML" />
              <parameter name="P_SUB_REPORT_NAME" dataType="character" defaultValue="" />
              <parameter name="P_CONC_PROG_SHT_NAME" dataType="character" defaultValue="XXTEST_XML" />
              </parameters>
         <dataQuery>
              <sqlStatement name="Q_MAIN">
              <![CDATA[
                   select pit.tag_number,
    pit.subinventory,
    loc.segment1||'.'||loc.segment2||'.'||loc.segment3 locatorname,
    pit.serial_num Serial_number,
    pit.tag_quantity COUNTQTY,
    pit.tag_uom uom,
    v.FULL_NAME CountedBy,
    msi.SEGMENT1||'.'||msi.DESCRIPTION ITEMDescr,
    pit.parent_lpn_id ,
    o.ORGANIZATION_NAME
    from
    mtl_system_items msi,
    mtl_item_locations loc ,
    mtl_employees_view v,
    mtl_physical_inventory_tags pit,
    org_organization_definitions o
    where pit.organization_id = :P_org_id
    and msi.organization_id(+) = :P_org_id
    and pit.ORGANIZATION_ID=o.ORGANIZATION_ID
    and loc.organization_id(+) = :P_org_id
    and pit.inventory_item_id = msi.inventory_item_id(+)
    and pit.locator_id = loc.inventory_location_id(+)
    and pit.physical_inventory_id = :P_phys_inv_id
    and pit.counted_by_employee_id = v.employee_id(+)
    and v.organization_id(+) = :P_org_id
    order by 1
    ]]>
              </sqlStatement>

    Still this problem as unsolved ? If so, please check the concurrent request parameter which is passed to this Data Template.

  • Xml report output not producing for Request sets.

    Hi,
    I build a xml report which has basically a request set of 2 programs
    1. the first program populates some staging table - pl/sql based program
    2. the second program is an xml report that reports off the staging table
    What is happening is that the second program loses the layout once submitted via request set. If you run them one by one it works fine but if you run them as a set and even enter the layout definition, it still doesn’t work and no output is produced.
    Any ideas?
    Please help!
    Thanks,
    Naresh

    Hi Naresh
    I think you may be better off amending your process slightly - rather than using a request set, submit the second request from the first. This way you will be able to use the fnd_request.add_layout function which sets up the layout template for the concurrent request. It's not perfect, but at least it works!

  • Count( ) function in BIP Report

    Hello,
    Can someone please help me with my count( ) function in BIP reports? I have this code in my RTF template below that only count 1 per ssImageType
    <?xdofx:if (ssStatus='Closed') and (ssGroup='EDS OPS') then count((/ssAction=/ssImageType))?><?end-if?>
    The undesired result is coming up below:
    Image Type A = 1
    Image Type A = 1
    Image Type A = 1
    Image Type B = 1
    Where we wanted it to come up as
    Image Type A = 3
    Image Type B = 1
    Image Type C = 0
    Any help would be greatly appreciated.
    Thank you

    What is the item that you want to count? I don't understand what you are trying to do here: count((/ssAction=/ssImageType))?
    If status is closed and ssGroup = EDS OPS, and ssAction = ssImageType, then you want to count the number of records?
    If you want to, send me the rtf and xml file to [email protected] and I can take a look. Send me the exact specification..
    Thanks,
    Bipuser

  • Reg: sum() function in XML

    HI frs,
    while using sum function in Xml.not getting correct output.
    for ex:
    i have created report with emp table.
    load the xml into MS-Word.
    i want to sum total of salary of employees.
    i used SUM() function to calculate but in output it adds twice the first value and adds the rest
    for ex :
    these are values
    200
    300
    500
    i am gettting total like 1200 actually it should be 1000.
    it adds like 200+200+300+500
    why is it so.
    Regards
    Rajesh

    Hi,
    I have a problem with the 'l_booklist', I declare it as 'l_booklist  TYPE REF TO if_ixml_node' like in the interface but a shortdump comes up. must it be filled?
    greets
    Thomas

  • XML Report

    Hi All,
    can anyone tell me difference between the xml report and rdf report
    i know some difference
    1) in the xml report we separate the data source with layout
    2) we can generate EXCEL output
    3) using single data source file we can build many layout template and we can generate different output with some little changes and we can generate in different luguages
    4) low development and customization cost
    5) we can easly generate complex report like fincail invoice ,purchase order report
    am i correct or anything i missed
    if anyone know plx explain me
    thnaks in advace

    Hello,
    I have been using Oracle Reports for over ten years and have worked on BIP for almost two years now, but with that said this is just my opinion...
    1) in the xml report we separate the data source with layout
    - Yes this is true and is IMO, the single, best feature of BIP you mention. But, it is not 100% always the case (I suspect due to BIP being a "new" tech; for example: subtemplates, see my thread I bump every week awaiting an answer...)
    2) we can generate EXCEL output
    - Yes, true, but this can be done in Oracle Reports as well
    3) using single data source file we can build many layout template and we can generate different output with some little changes and we can generate in different luguages
    - Yes, and I would most likely love this more if I had to actually use this functionality. ;-)
    4) low development and customization cost
    - I have to disagree with this. I am sure this is a point Oracle is pushing (but I remember them saying for Oracle Reports years ago too!). And for very, very simple reports it might actually be the case. But, overall, no it is not. I will fully retract this statement if you have an in-house (experienced) XML-FO developer that does not charge a ton of money (we do not).
    5) we can easly generate complex report like fincail invoice ,purchase order report
    - No, see #4 above.
    In regards to #4 and #5 I would have to say that developing most moderately complex reports in BIP is no easier than it was in Oracle Reports. The main difference you will find is that there are a lot more developers that have years of experience with Oracle reports, many less that have experience with BIP. And the same can be said for training (esp. in XML-FO) which is much harder to find. Also, I think the entire concept appears because it is supposed to be so much easier to use the MSWord plug in than it was to use the layout editor in Oracle Reports...well this may be true but there are many things that I can do in Oracle Reports that either can not be done or are much more difficult in BIP. And if my developer can not handle the layout editor in Reports, I don't want him! The bottom line on this is that the MSWord plug in is no where near an adequate replacement for the layout editor of Reports on complex reports (we have had to resort to using and codign "raw" XML-FO templates).
    Also, you left out the #1 reason to use BIP! Oracle Reports is going away and it will be replaced by BIP or something like it. This single point can not be over stated IMO (seriously).
    But, like I said, this is just my opinion.
    Scott
    Edit, okay I just re-read this and it seems a bit harsh...but I stand by it all. But, IMO BIP has huge potential and if you are a fool for XML-FO you can start reaping those rewards now...for the rest of us we need a real development tool, not just a MSWord plugin
    Edited by: ScottC on Oct 15, 2008 9:12 PM

  • Xml report Expand/Collapse option

    Is there a way to show the results in the xml report in 'Collapsed form' by default, when I view report? (Report format-ATML 5.0 standard report, Style sheet - tr5_report.xsl)
    I have many steps in my test sequence and the report is quite long. Because the results of all the steps and sub steps are in Expanded view by default, it is very difficult to see the results of a particular step and I have to scroll a lot.
    An option to collapse all the step results at once, even after opening the report would also be helpful for me.

    Try using tr5_horizontal.xsl or tr5_expand.xsl stylesheet for the ATML 5.0 report. Both stylesheet has expand and collapse functionality.
    Also, if you dont want any of the steps to be displayed in report, you can disable result logging for the step or use result filtering expression in Report Option to filter the step result in report.
    - Shashidhar

  • Function Security Navigator Report

    Hi,
    I have to create a comma delimited flat file with the data generated by Function Security Navigator Report without any Title/subtitle. The executable is a rdf file (FNDMNNAV). Neither do I have Oracle Report nor do I know Oracle Report. Does any one have the SQL query to generate this report? Most likely there are more than one SQL queries in the rdf file - if this is so then can you please give the steps of how the data are selected for this repor?
    Thanks,
    JP

    Hi JP,
    You could change the output to XML and create a basic BI Publisher template to achieve your requirements.
    Check out my blog for a similar example:
    http://garethroberts.blogspot.com/2007/09/standard-report-to-csv-file-via-bi.html
    Gareth

  • Print Images in XML Report

    Hi,
    I do have a requirement to print digital signature in a Quote, the signature is been stored as a picture (longraw datatype per_images table) in HRMS Tables
    HRMS Responsibility -> people -> Enter and Maintain -> Picture, here we will upload the signature of a person and this need be printed in XML Report.
    In the Report Builder if we change the ‘file format’ to ‘Image’ we are able to display the image , but when we are register in APPS, we not able to get the image, even XML tags are not been generated.
    Regards,
    Satish.

    Here...this should help !
    BLOB image in XML Publisher

  • How to open a form from Oracle XML Report .xls Output?

    Hi All,
    We have a requirement wherein we have one complex SQL query, requirement is to fetch the data from that query and show it to the user. So far, so good. We can either create a report thru' UTL file to show the output to the user or can create a XML report whose output can be in the excel format.
    Now user wants to have a hyperlink i.e. when he clicks the BSA (Blanket Sales Agreement) from the report output, it should be able to route him to BSA screen (oracle form), so that he can directly correct the issue with that corresponding BSA on which he clicked.
    i.e. requirement is to create a a hyperlink from report output which will route the user to that oracle form with the BSA queried.
    Not sure how can we implement this. If anybody has come across this type of requirement, please share your ideas and the approach used so as to accomplish this. Any inputs on this will be highly appreciated.
    Cheers!
    -Sumir

    Hello Sumir,
    we create reports in an XML format using http://matzberger.de/oracle/spreadsheet-en.html.
    Within these files you can create hyperlinks to a forms application like
    http://<applicationserver>/forms/frmservlet?config=xy&p_autoinit_module=ab&p_autoinit_arg=123
    With these parameters we call a default forms module (welcome screen) and then start module ab and execute a query for 123. The user then can directly access the data he needs.
    Regards
    Marcus

Maybe you are looking for

  • EBP PO : Unable to duplicate/copy  item,GR_NON_VAL issue

    Hello, I am using SRM 5.O . In Process PO when I go to create the PO with more than one line item following issue comes : When I entered one line item and check its ok when I click on  <b>Duplicate Selected</b> Item or <b>Copy</b> push button than ch

  • How do you setup 2 separate apple accounts in icloud to download pictures into Photo Stream?

    My wife and I have separate iphones running on there own ids.  Cannot find a way to have both iphones feed photos into a common photo stream to the phones and our macbook pro.  This has to be supported and cannot figure it out.  Thoughts?

  • ME32K

    I've changed the net price in the contract (ME32K) but i see the old prince in the printpreview. Why? The validity of the old price was until 31.03.2009. And the validity of the new price is until .9999. The price date is 31.12.9999. In the EKPO i se

  • Creation of Authorization is RSECADMIN

    Hi, I am trying to create authorization for Sales Group in RSECADMIN. Can anyone please help me in doing this? Thanks in advance, Regards, Manjari.

  • Networking an Installation [SOLVED]

    Hello, I'm trying to get the networking on an ArchLinux installation working on Xen/SolusVM.  My provider said it's not officially supported and they have no clue how to do it, but they setup an image for me and he said that I'd have to "edit /etc/rc