Report Trigger Code in Data Template

Hello all,
I've inserted a report trigger into a data template and created the required function in my database. Everything works as expected.
My question is, is there any way to write the report trigger within the data template? Given the choice, I'd rather have the trigger code embedded within the data template itself rather than existing in a separate package.
I've found no examples of this, but I just wanted to confirm that it can't be done.
Thanks.
Edited by: jasonr on May 17, 2011 7:39 AM

No,
The code to be executed by trigger will be a PL/SQL package, and it will reside in DB only.

Similar Messages

  • Report Based on XML Data Template is timing out

    Hi there,
    i have an XML publisher report based on an XML data template that i've written. The report is working fine except when there is huge data that is supposed to come out, its timing out. Ive set the db_fetch_size parameter to 20 and scalable_mode to on but its still timing out.
    If anyone has a solutiom or a thought it would be much appreciated.
    Thanks.

    Thanks for the reply.
    Well when i'm opening the report , i wait for about 15 seconds then 'Page Cannot be Displayed' appears on my browser. I'm having this case only when i'm expecting huge data. By huge data i mean that the report gets informations about a deal, when the deal has 10 categories the report runs fine, but when i add all catgories, about 1000, it gives me the 'Page cannot be displayed' error. I'm guessing its a time out issue since i've set the scalable_mode parameter to on. Any thoughts ???

  • 'Order by' in a parameter - in AfterPForm trigger..? in a Data template..?

    Arrrfternoon all.
    As title confusingly asks.. Has anybody put an 'order by' parameter into their data template either by the use of a trigger or by some other way..?
    As one or two have may have guessed by now, I'm a newbie to BIP with no training but am learning fast..
    In ORACLE Reports 6i I'd stick the order by in the select statement, named it in the Conc Program 'token' and have the details that the user can choose from (if...then...else'd..) in the AfterpForm section.
    If the above still applies (and from the example data templates I've seen - it does) then all I do is call the AfterPForm trigger in the data template BUT, where do I write and place the actual PForm trigger (that includes the if orderby = 'empname' ...then..)..?
    thanks for reading..
    Steven

    OK, I've now created my data template that includes a reference to the trigger.
    I've also created my package Header and Body - but the question still remains.. How do I now include the Package Header & Body when the Data Template is being run..? How is it referenced? If I just run this data template in my BIP'd Concurrent Program surely it'll just say 'whats the trigger you've mentioned - where is it..?'
    Basically, I don't how this hangs together at all. Can someone please help me out here?
    Many Thanks for looking..
    Steven

  • How to create Data Template for creation of BI Pulisher Report

    Hi,
    I m having all the steps for creation of BI Pulisher report using Data Template, like 1st create Data Template, Add new Data Definition, upload Data Template, Create Concurrent Program and run the request, save o/p and create rtf layout, upload Template and again run Concurrent program to view output.
    All steps are working fine.. but my simple question is every time we need to write code for Data Template i.e. xml file ? is there is tool or something which will create this Data template for us using rdf? or is there any other way ?
    Please guide ..
    Regards,
    Priyanka.

    Hi;
    Please see below note which could be helpful for your issue:
    NOTE:367394.1 - About Oracle XML Publisher Release 5.6.2
    Also see:
    http://www.adivaconsulting.com/adiva-blog/item/5-datatemplate
    http://apps2fusion.com/at/51-ps/262-xml-publisher-and-data-template-sql-query-to-develop-bi-publisher-reports
    http://blogs.oracle.com/xmlpublisher/data_extraction/data_templates/
    Regard
    Helios

  • Error while using Before report trigger. -- Urgent

    Dear All,
    The following error I am getting when I execute my data template where I have used Before Report Trigger. I am also pasting the Data Template that I have developed.
    ============================
    Error
    ============================
    XDO Data Engine Version No: 5.6.3
    Resp: 20560
    Org ID : 204
    Request ID: 4846248
    All Parameters: P_LOB=01:P_DIV_FROM=:P_DIV_TO=:P_FROM_ORG=:P_TO_ORG=:P_INV_FROM=:P_TO_INV=:P_TRX_DATE_FROM="2003/01/01 00:00:00":P_TRX_DATE_TO="2003/01/15 00:00:00"
    Data Template Code: SSBWIPANA_MFGR
    Data Template Application Short Name: WIP
    Debug Flag: N
    {P_DIV_FROM=, P_TRX_DATE_TO=2003/01/15 00:00:00, P_DIV_TO=, P_FROM_ORG=, P_TO_ORG=, P_TRX_DATE_FROM=2003/01/01 00:00:00, P_INV_FROM=, P_LOB=01, P_TO_INV=}
    Calling XDO Data Engine...
    [122407_011745100][][EXCEPTION] SQLException encounter while executing data trigger....
    java.sql.SQLException: ORA-06550: line 2, column 12:
    PLS-00302: component 'P_LOB' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 3, column 12:
    PLS-00302: component 'P_DIV_FROM' must be declared
    ORA-06550: line 3, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 4, column 12:
    PLS-00302: component 'P_DIV_TO' must be declared
    ORA-06550: line 4, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 5, column 12:
    PLS-00302: component 'P_FROM_ORG' must be declared
    ORA-06550: line 5, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 6, column 12:
    PLS-00302: component 'P_TO_ORG' must be declared
    ORA-06550: line 6, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 7, column 12:
    PLS-00302: component 'P_FROM_INV' must be declared
    ORA-06550: line 7, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 8, column 12:
    PLS-00302: component 'P_TO_INV' must be declared
    ORA-06550: line 8, column 1:
    PL/SQL: Statement ignored
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:215)
         at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:967)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3327)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3433)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4394)
         at oracle.apps.xdo.dataengine.XMLPGEN.executeTriggers(XMLPGEN.java:699)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:205)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:237)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:364)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    =====================================================
    Data Template
    ====================================================
    <dataTemplate name="SSBWIPANA_MFGR" defaultPackage="PRODUCTION" version="1.0">
    <parameters>
    <parameter name="P_LOB" datatype="charecter"/>
    <parameter name="P_DIV_FROM" datatype="charecter"/>
    <parameter name="P_DIV_TO" datatype="charecter"/>
    <parameter name="P_FROM_ORG" datatype="charecter"/>
    <parameter name="P_TO_ORG" datatype="charecter"/>
    <parameter name="P_FROM_INV" datatype="charecter"/>
    <parameter name="P_TO_INV" datatype="charecter"/>
    <parameter name="P_TRX_DATE_FROM" datatype="charecter"/>
    <parameter name="P_TRX_DATE_TO" datatype="charecter"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q_1">
    <![CDATA[SELECT DISTINCT MSI.CONCATENATED_SEGMENTS, MMT.INVENTORY_ITEM_ID,
                    MSI.DESCRIPTION, MMT.TRANSACTION_UOM, SDT.TRX_DATE,
                    MTP.ORGANIZATION_CODE, MMT.ORGANIZATION_ID
               FROM MTL_MATERIAL_TRANSACTIONS MMT,
                    MTL_PARAMETERS MTP,
                    MTL_SYSTEM_ITEMS_VL MSI,
                    SSBWIP_DATE_TEMP SDT
              WHERE MMT.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID
                AND MMT.ORGANIZATION_ID = MSI.ORGANIZATION_ID
                AND MSI.ORGANIZATION_ID = MTP.ORGANIZATION_ID
                AND MMT.ORGANIZATION_ID = MTP.ORGANIZATION_ID
                AND MMT.TRANSACTION_TYPE_ID IN (17, 44)
                AND MMT.ORGANIZATION_ID IN (
                       SELECT MP.ORGANIZATION_ID
                         FROM MTL_PARAMETERS MP, GL_CODE_COMBINATIONS GCC
                        WHERE MP.MATERIAL_ACCOUNT = GCC.CODE_COMBINATION_ID
                          AND GCC.SEGMENT1 = :P_LOB
                          AND (GCC.SEGMENT2 BETWEEN NVL (:P_DIV_FROM,
                                                         GCC.SEGMENT2)
                                                AND NVL (:P_DIV_TO, GCC.SEGMENT2)
                AND MTP.ORGANIZATION_CODE BETWEEN NVL (:P_FROM_ORG,
                                                       MTP.ORGANIZATION_CODE
                                              AND NVL (:P_TO_ORG,
                                                       MTP.ORGANIZATION_CODE
                AND MSI.CONCATENATED_SEGMENTS BETWEEN NVL
                                                        (:P_FROM_INV,
                                                         MSI.CONCATENATED_SEGMENTS
                                                  AND NVL
                                                        (:P_TO_INV,
                                                         MSI.CONCATENATED_SEGMENTS
           ORDER BY MSI.CONCATENATED_SEGMENTS, MTP.ORGANIZATION_CODE]]>
    </sqlStatement>
    <sqlStatement name="Q_2">
    <![CDATA[SELECT NVL (SUM (TRANSACTION_QUANTITY), 0) COMPLETION
           FROM MTL_MATERIAL_TRANSACTIONS
         WHERE INVENTORY_ITEM_ID = :INVENTORY_ITEM_ID
           AND ORGANIZATION_ID = :ORGANIZATION_ID
           AND TRANSACTION_TYPE_ID = 44
           AND TRUNC (TRANSACTION_DATE) = :TRX_DATE]]>
    </sqlStatement>
    <sqlStatement name="Q_3">
    <![CDATA[SELECT NVL (SUM (TRANSACTION_QUANTITY) * -1, 0) INCOMPLETION
          FROM MTL_MATERIAL_TRANSACTIONS
        WHERE INVENTORY_ITEM_ID = :INVENTORY_ITEM_ID
          AND ORGANIZATION_ID = :ORGANIZATION_ID
          AND TRANSACTION_TYPE_ID = 17
          AND TRUNC (TRANSACTION_DATE) = :TRX_DATE]]>
    </sqlStatement>
    <sqlStatement name="Q_4">
    <![CDATA[SELECT DESCRIPTION
          FROM FND_FLEX_VALUES_VL
        WHERE FLEX_VALUE_SET_ID = 1002470
              AND FLEX_VALUE = :P_LOB]]>
    </sqlStatement>
    <sqlStatement name="Q_5">
    <![CDATA[SELECT DESCRIPTION
         FROM FND_FLEX_VALUES_VL
        WHERE FLEX_VALUE_SET_ID = 1012471
          AND FLEX_VALUE = :P_DIV_FROM
          AND PARENT_FLEX_VALUE_LOW = :P_LOB]]>
    </sqlStatement>
    <sqlStatement name="Q_6">
    <![CDATA[SELECT DESCRIPTION
         FROM FND_FLEX_VALUES_VL
        WHERE FLEX_VALUE_SET_ID = 1012471
          AND FLEX_VALUE = :P_DIV_TO
          AND PARENT_FLEX_VALUE_LOW = :P_LOB]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="beforeReport" source="PRODUCTION.beforereporttrigger(:P_TRX_DATE_FROM,:P_TRX_DATE_TO)"/>
    <dataStructure>
    <group name="G_CONCATENATED_SEGMENTS" source="Q_1">
    <element name="CONCATENATED_SEGMENTS" datatype="charecter" value="CONCATENATED_SEGMENTS"/>
    <element name="DESCRIPTION" datatype="charecter" value="DESCRIPTION"/>
    <element name="TRANSACTION_UOM" datatype="charecter" value="TRANSACTION_UOM"/>
    <element name="INVENTORY_ITEM_ID" datatype="number" value="INVENTORY_ITEM_ID"/>
    <element name="ORGNIZATION_ID" datatype="number" value="ORGANIZATION_ID"/>
    <group name="G_TRX_DATE" source="Q_1">
    <element name="TRX_DATE" datatype="date" value="TRX_DATE"/>
    <group name="G_1" source="Q_1">
    <element name="ORGANIZATION_CODE" datatype="charecter" value="ORGANIZATION_CODE"/>
    <group name="G_ORGANIZATION_CODEC" source="Q_2">
    <element name="COMPLETION" datatype="number" value="COMPLETION"/>
    </group>
    <group name="G_ORGANIZATION_CODEI" source="Q_3">
    <element name="INCOMPLETION" datatype="number" value="INCOMPLETION"/>
    </group>
    </group>
    </group>
    </group>
    <group name="G_LOB" source="Q_4">
    <element name="CF_LOB" datatype="charecter" value="description"/>
    </group>
    <group name="G_FROM_DIV" source="Q_5">
    <element name="CF_DIVFROM" datatype="charecter" value="description"/>
    </group>
    <group name="G_TO_DIV" source="Q_6">
    <element name="CF_DIVTO" datatype="charecter" value="descrption"/>
    </group>
    <element name="CS_COUNT" function="count()" datatype="number" value="G_CONCATENATED_SEGMENTS.CONCATENATED_SEGMENTS"/>
    </dataStructure>
    </dataTemplate>
    Pls. suggest me.
    null

    Hi,
    without checked the whole document .... you've defined all paramaters as datataype charecter instead of character.
    Regards
    Rainer

  • Unable to debug the Data Template Error in the Log file

    Hi,
    I am unable to debug the log file error message Please can anybody explain me in detail where the error lies and how to solve the error.The log file shows the following message.
    XDO Data Engine ver 1.0
    Resp: 50554
    Org ID : 204
    Request ID: 2865643
    All Parameters: USER_ID=1318:REPORT_TYPE=Report Only:P_SET_OF_BOOKS_ID=1:TRNS_STATUS=Posted:P_APPROVED=Not Approved:PERIOD=Sep-05
    Data Template Code: ILDVAPDN
    Data Template Application Short Name: CLE
    Debug Flag: Y
    {TRNS_STATUS=Posted, REPORT_TYPE=Report Only, PERIOD=Sep-05, USER_ID=1318, P_SET_OF_BOOKS_ID=1, P_APPROVED=Not Approved}
    Calling XDO Data Engine...
    java.lang.NullPointerException
         at oracle.apps.xdo.dataengine.DataTemplateParser.getObjectVlaue(DataTemplateParser.java:1424)
         at oracle.apps.xdo.dataengine.DataTemplateParser.replaceSubstituteVariables(DataTemplateParser.java:1226)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:398)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:281)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:251)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:192)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:222)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:334)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:272)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:148)
    Start of log messages from FND_FILE
    Start of After parameter Report Trigger Execution..
    Gl Set of Books.....P
    Organization NameVision Operations
    Entering TRNS STATUS POSTED****** 648Posted
    end of the trns status..687 Posted
    currency_code 20USD
    P_PRECISION 272
    precision 332
    GL NAME 40Vision Operations (USA)
    Executing the procedure get format ..
    ExecutED the procedure get format and the Result..
    End of Before Report Execution..
    End of log messages from FND_FILE
    Executing request completion options...
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 2865643 on node AP615CMR at 28-SEP-2006 07:58:26.
    Post-processing of request 2865643 failed at 28-SEP-2006 07:58:38 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 28-SEP-2006 07:58:38
    Thanks & Regards
    Suresh Singh

    Generally the DBAs are aware of the OPP service log. They can tell you the cause of the problem.
    Anyway, how did you resolve the issue?

  • Error in After Report Trigger

    Hi,
    I've developed a report in HRMS for my client which collated the Vacation Accrual data of all employees. When i run the report for all employees which is an optional parameter it throwing the below error.
    REP-0300: ORACLE error occurred.
    REP-0069: Internal error
    In-process job terminated:Terminated with error:
    REP-300:
    During debugging i found that in the After Report Trigger , after the return statement, the below error is being thrown. I couldn't identify the exact source of the error. Any help on this would be much appreciated. Below is the After Report Trigger code.
    function AfterReport return boolean is
    begin
    srw.MESSAGE (12345, 'After Report - Before Return');
    return (TRUE);
    srw.MESSAGE (12345, 'After Report - After Return');
    end;
    Thanks
    Elango

    After spending a lot of time in analyzing, i ripped apart each and every part of the report and found a function where am doing a varchar to date conversion. Then i ran the query individually and picked up the below error.
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    Then i identified the record which has incorrect data and modified it thru applications. Oracle Internal error basically arises due to datatype mismatch and its always better to use exception blocks with log messages wherever its applicable.
    Thanks
    Elango.

  • Data template datatrigger error

    Hi I have a data template that I'm currently getting an datatrigger error with when trying to generate the xml data. I believe I have my dataTrigger coded correctly and am unsure how to resolve this problem. Below is the data template code, plsql code and the actual error. Can somebody please tell me how to fix this error?
    Please help!
    <?xml version="1.0"?>
    <dataTemplate name="XXKNC_WIPDJCR" description="WIP Critical Ratio Report" dataSourceRef="TEST" version="1.0">
    <parameters>
    <parameter name="S_DEPT" dataType="character"/>
    <parameter name="E_DEPT" dataType="character"/>
    <parameter name="P_QTY_IN_QUEUE" dataType="character"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="MAIN_Q1">
    <![CDATA[
    select distinct cr.Dept_Name, cr.Dept_Description,
    case
               when cr.denominator = 0 then 0
               else round(cr.numerator/cr.denominator,2)
    end critical_ratio,
    cr.Sched_Op_Start_Date, cr.Sched_Op_Completion_Date,
    to_char(cr.MPS_SCHEDULED_COMPLETION_DATE,'MM/DD/RRRR') as JOB_COMP_DATE,
    cr.Job_Name, cr.Lot_Number, cr.PART# as ITEM,
    substr(cr.Item_Description,1,50) as Item_Description, cr.Op_Seq as OPER,
    substr(cr.OP_Description,1,30) as OP_Description, cr.Quantity_Scheduled, cr.Quantity_In_Queue,        cr.QUANTITY_COMPLETED
    from
    select distinct a.Dept_Name, a.Dept_Description, a.Job_Name, a.wip_entity_id,       a.MPS_SCHEDULED_COMPLETION_DATE, round(xxknc_critical_ratio_num(a.wip_entity_id),4) as numerator,
    den.denominator, to_char(a.Sched_Op_Start_Date,'MM/DD/RRRR') as Sched_Op_Start_Date,
    to_char(a.Sched_Op_Completion_Date,'MM/DD/RRRR') as Sched_Op_Completion_Date,
    a.PART#, a.Item_Description, a.LOT_NUMBER, a.Quantity_Scheduled,  a.Quantity_In_Queue,
    a.QUANTITY_COMPLETED,  a.Op_Seq, a.OP_Description,
    xxknc.xxknc_qty_in_queue.CF_RowNumFormula as CF_RowNumFormula
    from
        select distinct BD.DEPARTMENT_CODE Dept_Name, BD.DESCRIPTION Dept_Description,
                   WE.WIP_ENTITY_NAME Job_Name, dj.lot_number, dj.MPS_SCHEDULED_COMPLETION_DATE,
                    WO.FIRST_UNIT_START_DATE as Sched_Op_Start_Date,
                  WO.LAST_UNIT_COMPLETION_DATE as Sched_Op_Completion_Date, i.inventory_item AS PART#,
    i.DESCRIPTION Item_Description, WO.OPERATION_SEQ_NUM Op_Seq, WO.DESCRIPTION   OP_Description,
    WO.SCHEDULED_QUANTITY Quantity_Scheduled,  WO.QUANTITY_IN_QUEUE Quantity_In_Queue,
    WO.QUANTITY_COMPLETED, wor.usage_rate_or_amount, wor.applied_resource_units, wo.wip_entity_id
      from apps.WIP_OPERATIONS wo, BOM_DEPARTMENTS BD, wip_operation_resources wor
           ,WIP_DISCRETE_JOBS DJ, WIP_ENTITIES WE, invfg_items i    
      where WO.ORGANIZATION_ID = 82
      and DJ.ORGANIZATION_ID = 82
      AND WE.ORGANIZATION_ID = 82
      AND i.ORGANIZATION_ID = 82
      AND BD.ORGANIZATION_ID = 82
      AND BD.DEPARTMENT_ID = WO.DEPARTMENT_ID
      AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
      AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
      AND WE.ENTITY_TYPE = 1
      and dj.status_type = 3
      AND wo.wip_entity_id = dj.wip_entity_id
      AND wor.wip_entity_id = wo.wip_entity_id
      AND wor.operation_seq_num = wo.operation_seq_num
      AND wor.uom_code IN ('HR')
      and basis_type in (2)
      and activity_id in (4,1000)
      UNION
        select distinct BD.DEPARTMENT_CODE Dept_Name, BD.DESCRIPTION Dept_Description,
            WE.WIP_ENTITY_NAME Job_Name, dj.lot_number, dj.MPS_SCHEDULED_COMPLETION_DATE,
            WO.FIRST_UNIT_START_DATE as Sched_Op_Start_Date,
            WO.LAST_UNIT_COMPLETION_DATE as Sched_Op_Completion_Date,
            i.inventory_item AS PART#, i.DESCRIPTION Item_Description, WO.OPERATION_SEQ_NUM Op_Seq,
            WO.DESCRIPTION OP_Description, WO.SCHEDULED_QUANTITY Quantity_Scheduled, 
            WO.QUANTITY_IN_QUEUE Quantity_In_Queue, WO.QUANTITY_COMPLETED,
           (wor.usage_rate_or_amount * WO.QUANTITY_COMPLETED) as usage_rate_or_amount,
           wor.applied_resource_units, wo.wip_entity_id
    from apps.WIP_OPERATIONS wo, BOM_DEPARTMENTS BD, wip_operation_resources wor      ,WIP_DISCRETE_JOBS DJ, WIP_ENTITIES WE, invfg_items i
      where WO.ORGANIZATION_ID = 82
      and DJ.ORGANIZATION_ID = 82
      AND WE.ORGANIZATION_ID = 82
      AND i.ORGANIZATION_ID = 82
      AND BD.ORGANIZATION_ID = 82
      AND BD.DEPARTMENT_ID = WO.DEPARTMENT_ID
      AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
      AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
      AND WE.ENTITY_TYPE = 1
      and dj.status_type = 3
      AND wo.wip_entity_id = dj.wip_entity_id
      AND wor.wip_entity_id = wo.wip_entity_id
      AND wor.operation_seq_num = wo.operation_seq_num
      AND wor.uom_code IN ('HR')
      and basis_type in (1)
      and activity_id in (1)
      UNION
        select distinct BD.DEPARTMENT_CODE Dept_Name, BD.DESCRIPTION Dept_Description,
             WE.WIP_ENTITY_NAME Job_Name, dj.lot_number, dj.MPS_SCHEDULED_COMPLETION_DATE,
             WO.FIRST_UNIT_START_DATE as Sched_Op_Start_Date,
             WO.LAST_UNIT_COMPLETION_DATE as Sched_Op_Completion_Date,
             i.inventory_item AS PART#, i.DESCRIPTION Item_Description, WO.OPERATION_SEQ_NUM Op_Seq,
             WO.DESCRIPTION OP_Description, WO.SCHEDULED_QUANTITY Quantity_Scheduled, 
             WO.QUANTITY_IN_QUEUE Quantity_In_Queue, WO.QUANTITY_COMPLETED,
             (wor.usage_rate_or_amount * 24) as usage_rate_or_amount,
             wor.applied_resource_units, wo.wip_entity_id
      from apps.WIP_OPERATIONS wo,
           BOM_DEPARTMENTS BD, wip_operation_resources wor, WIP_DISCRETE_JOBS DJ, WIP_ENTITIES WE
           ,invfg_items i
      where WO.ORGANIZATION_ID = 82
      and DJ.ORGANIZATION_ID = 82
      AND WE.ORGANIZATION_ID = 82
      AND i.ORGANIZATION_ID = 82
      AND BD.ORGANIZATION_ID = 82
      AND BD.DEPARTMENT_ID = WO.DEPARTMENT_ID
      AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
      AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
      AND WE.ENTITY_TYPE = 1
      and dj.status_type = 3
      AND wo.wip_entity_id = dj.wip_entity_id
      AND wor.wip_entity_id = wo.wip_entity_id
      AND wor.operation_seq_num = wo.operation_seq_num
      AND wor.uom_code IN ('DAY')
      and basis_type in (2)
      and activity_id in (4,1000)
      UNION
      select distinct BD.DEPARTMENT_CODE Dept_Name, BD.DESCRIPTION Dept_Description,
             WE.WIP_ENTITY_NAME Job_Name, dj.lot_number, dj.MPS_SCHEDULED_COMPLETION_DATE,
             WO.FIRST_UNIT_START_DATE as Sched_Op_Start_Date,
             WO.LAST_UNIT_COMPLETION_DATE as Sched_Op_Completion_Date,
             i.inventory_item AS PART#, i.DESCRIPTION Item_Description, WO.OPERATION_SEQ_NUM Op_Seq,
             WO.DESCRIPTION OP_Description, WO.SCHEDULED_QUANTITY Quantity_Scheduled, 
             WO.QUANTITY_IN_QUEUE Quantity_In_Queue, WO.QUANTITY_COMPLETED,
             ((wor.usage_rate_or_amount * 24) * WO.QUANTITY_COMPLETED) as usage_rate_or_amount,
             wor.applied_resource_units, wo.wip_entity_id
      from apps.WIP_OPERATIONS wo, BOM_DEPARTMENTS BD, wip_operation_resources wor
          ,WIP_DISCRETE_JOBS DJ, WIP_ENTITIES WE, invfg_items i
      where WO.ORGANIZATION_ID = 82
      and DJ.ORGANIZATION_ID = 82
      AND WE.ORGANIZATION_ID = 82
      AND i.ORGANIZATION_ID = 82
      AND BD.ORGANIZATION_ID = 82
      AND BD.DEPARTMENT_ID = WO.DEPARTMENT_ID
      AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
      AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
      AND WE.ENTITY_TYPE = 1
      and dj.status_type = 3
      AND wo.wip_entity_id = dj.wip_entity_id
      AND wor.wip_entity_id = wo.wip_entity_id
      AND wor.operation_seq_num = wo.operation_seq_num
      AND wor.uom_code IN ('DAY')
      and basis_type in (1)
      and activity_id in (1)
      UNION
      select distinct BD.DEPARTMENT_CODE Dept_Name, BD.DESCRIPTION Dept_Description,  WE.WIP_ENTITY_NAME Job_Name, dj.lot_number, dj.MPS_SCHEDULED_COMPLETION_DATE,
             WO.FIRST_UNIT_START_DATE as Sched_Op_Start_Date,
             WO.LAST_UNIT_COMPLETION_DATE as Sched_Op_Completion_Date,
             i.inventory_item AS PART#, i.DESCRIPTION Item_Description, WO.OPERATION_SEQ_NUM Op_Seq,
             WO.DESCRIPTION OP_Description, WO.SCHEDULED_QUANTITY Quantity_Scheduled, 
             WO.QUANTITY_IN_QUEUE Quantity_In_Queue, WO.QUANTITY_COMPLETED,
             NULL AS usage_rate_or_amount, NULL AS applied_resource_units, wo.wip_entity_id
            from apps.WIP_OPERATIONS wo, BOM_DEPARTMENTS BD, WIP_DISCRETE_JOBS DJ,
                 WIP_ENTITIES WE, invfg_items i    
            where WO.ORGANIZATION_ID = 82
            and DJ.ORGANIZATION_ID = 82
            AND WE.ORGANIZATION_ID = 82
            AND i.ORGANIZATION_ID = 82
            AND BD.ORGANIZATION_ID = 82
            AND BD.DEPARTMENT_ID = WO.DEPARTMENT_ID
            AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
            AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
            AND WE.ENTITY_TYPE = 1
          and dj.status_type = 3
            AND wo.wip_entity_id = dj.wip_entity_id
            and wo.operation_seq_num between 1 and 10
            and wo.quantity_in_queue > 0
            and wo.operation_seq_num NOT IN (select distinct operation_seq_num from wip_operation_resources
                                         where wip_entity_id = wo.wip_entity_id
                                         and operation_seq_num between 1 and 10)
            order by 1
    ) a,
    ( -- this inline view gets the denominator value
        select b.Job_Name, b.WIP_ENTITY_ID, xxknc_critical_ratio_den (b.wip_entity_id) as denominator
        from
        select a.Job_Name, a.WIP_ENTITY_ID,
               sum(a.usage_rate_or_amount) as usage_rate_or_amount
        from
         select distinct WE.WIP_ENTITY_ID, WE.WIP_ENTITY_NAME Job_Name, wor.usage_rate_or_amount, WO.LAST_UNIT_COMPLETION_DATE
          from apps.WIP_OPERATIONS wo, wip_operation_resources wor, WIP_DISCRETE_JOBS DJ
               ,WIP_ENTITIES WE, invfg_items i
          where WO.ORGANIZATION_ID = 82
          and DJ.ORGANIZATION_ID = 82
          AND WE.ORGANIZATION_ID = 82
          AND i.ORGANIZATION_ID = 82
          AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
          AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
          AND WE.ENTITY_TYPE = 1
          and dj.status_type = 3
          AND wo.wip_entity_id = dj.wip_entity_id
          AND wor.wip_entity_id = wo.wip_entity_id
          AND wor.operation_seq_num = wo.operation_seq_num
          AND wor.uom_code IN ('HR')
          and basis_type in (2)
          and activity_id in (4,1000)
          UNION
          select distinct WE.WIP_ENTITY_ID, WE.WIP_ENTITY_NAME Job_Name,
                (wor.usage_rate_or_amount * WO.QUANTITY_COMPLETED) as usage_rate_or_amount, WO.LAST_UNIT_COMPLETION_DATE
          from apps.WIP_OPERATIONS wo, wip_operation_resources wor, WIP_DISCRETE_JOBS DJ
               ,WIP_ENTITIES WE, invfg_items i
          where WO.ORGANIZATION_ID = 82
          and DJ.ORGANIZATION_ID = 82
          AND WE.ORGANIZATION_ID = 82
          AND i.ORGANIZATION_ID = 82
          AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
          AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
          AND WE.ENTITY_TYPE = 1
          and dj.status_type = 3
          AND wo.wip_entity_id = dj.wip_entity_id
          AND wor.wip_entity_id = wo.wip_entity_id
          AND wor.operation_seq_num = wo.operation_seq_num
          AND wor.uom_code IN ('HR')
          and basis_type in (1)
          and activity_id in (1)
          UNION
          select distinct WE.WIP_ENTITY_ID, WE.WIP_ENTITY_NAME Job_Name,
                (wor.usage_rate_or_amount * 24) as usage_rate_or_amount, WO.LAST_UNIT_COMPLETION_DATE
          from apps.WIP_OPERATIONS wo, wip_operation_resources wor, WIP_DISCRETE_JOBS DJ
               ,WIP_ENTITIES WE, invfg_items i
          where WO.ORGANIZATION_ID = 82
          and DJ.ORGANIZATION_ID = 82
          AND WE.ORGANIZATION_ID = 82
          AND i.ORGANIZATION_ID = 82
          AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
          AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
          AND WE.ENTITY_TYPE = 1
          and dj.status_type = 3
          AND wo.wip_entity_id = dj.wip_entity_id
          AND wor.wip_entity_id = wo.wip_entity_id
          AND wor.operation_seq_num = wo.operation_seq_num
          AND wor.uom_code IN ('DAY')
          and basis_type in (2)
          and activity_id in (4,1000)
          UNION
          select distinct WE.WIP_ENTITY_ID, WE.WIP_ENTITY_NAME Job_Name,
                ((wor.usage_rate_or_amount * 24) * WO.QUANTITY_COMPLETED) as usage_rate_or_amount, WO.LAST_UNIT_COMPLETION_DATE
          from apps.WIP_OPERATIONS wo, wip_operation_resources wor, WIP_DISCRETE_JOBS DJ
              ,WIP_ENTITIES WE, invfg_items i
          where WO.ORGANIZATION_ID = 82
          and DJ.ORGANIZATION_ID = 82
          AND WE.ORGANIZATION_ID = 82
          AND i.ORGANIZATION_ID = 82
          AND i.inventory_item_id = WE.PRIMARY_ITEM_ID
          AND WO.WIP_ENTITY_ID = WE.WIP_ENTITY_ID
          AND WE.ENTITY_TYPE = 1
          and dj.status_type = 3
          AND wo.wip_entity_id = dj.wip_entity_id
          AND wor.wip_entity_id = wo.wip_entity_id
          AND wor.operation_seq_num = wo.operation_seq_num
          AND wor.uom_code IN ('DAY')
          and basis_type in (1)
          and activity_id in (1)
          order by 1
        ) a
        group by a.WIP_ENTITY_ID, a.Job_Name
        ) b
        order by 1
        ) den
    where a.wip_entity_id = den.wip_entity_id
    ORDER BY a.Job_Name
    ) cr
    where upper(cr.Dept_Name) between nvl(upper(:S_DEPT), upper(cr.Dept_Name)) and nvl(upper(:E_DEPT),upper(cr.Dept_Name))
    and &pwhereclause
    order by 1,3,6,8
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="beforeReport" source="xxknc_qty_in_queue.BeforeReportTrigger(:P_QTY_IN_QUEUE)" />
    <dataStructure>
    <group name="G_DEPT_NAME" source="MAIN_Q1">
    <element name="Dept_Name" value="DEPT_NAME" />
    <element name="DEPT_DESCRIPTION" value="DEPT_DESCRIPTION" />
    <element name="LOT_NUMBER" value="LOT_NUMBER" />
    <element name="QUANTITY_SCHEDULED" value="QUANTITY_SCHEDULED" />
    <element name="CRITICAL_RATIO" value="CRITICAL_RATIO" />
    <element name="SCHED_OP_START_DATE" value="SCHED_OP_START_DATE" />
    <element name="SCHED_OP_COMPLETION_DATE" value="SCHED_OP_COMPLETION_DATE" />
    <element name="JOB_COMP_DATE" value="JOB_COMP_DATE" />
    <element name="JOB_NAME" value="JOB_NAME" />
    <element name="ITEM" value="ITEM" />
    <element name="ITEM_DESCRIPTION" value="ITEM_DESCRIPTION" />
    <element name="OPER" value="OPER" />
    <element name="OPER_DESCRIPTION" value="OPER_DESCRIPTION" />
    <element name="QUANTITY_IN_QUEUE" value="QUANTITY_IN_QUEUE" />
    <element name="QUANTITY_COMPLETED" value="QUANTITY_COMPLETED" />
    <element name="CF_ROWNUMFORMULA" value="CF_ROWNUMFORMULA" />
    <element name="S_DEPT" value="S_DEPT" />
    <element name="E_DEPT" value="E_DEPT" />
    <element name="P_QTY_IN_QUEUE" value="P_QTY_IN_QUEUE" />
    </group>
    </dataStructure>
    </dataTemplate>
    create or replace package xxknc_qty_in_queue is
    P_QTY_IN_QUEUE varchar2(100);
    pwhereclause varchar2(1000);
    function BeforeReportTrigger(p_qty_in_queue IN varchar2) return boolean;
    function CF_RowNumFormula return number;
    end xxknc_qty_in_queue;
    create or replace package body xxknc_qty_in_queue as
    function BeforeReportTrigger(p_qty_in_queue IN varchar2) return boolean
    is
    begin
    pwhereclause := 'x';
    if(upper(P_QTY_IN_QUEUE) = 'YES') then
         pwhereclause := 'cr.Quantity_In_Queue > 0';
    elsif (upper(P_QTY_IN_QUEUE) = 'NO') then
         pwhereclause := 'cr.Quantity_In_Queue = 0';
    else
         pwhereclause := '1=1';      
    end if;
    return (TRUE);
    end BeforeReportTrigger;
    function CF_RowNumFormula return Number
    is
    vCount number;
    begin
         vCount := 0;
         vCount:=apps.XXKNC_SHIP_OUTLOOK_REPORT;
         if (mod(vCount,2) = 0) then
              return 1;
    else
    return 0;
    end if;
    end CF_RowNumFormula;
    end xxknc_qty_in_queue;
    Custom Application: Version : UNKNOWN
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XXKNC_WIPDJCR_DEF module: XXKNC_WIP_XML_Data_Template
    Current system time is 20-JUL-2009 08:24:12
    XDO Data Engine Version No: 5.6.3
    Resp: 20420
    Org ID : 81
    Request ID: 3370019
    All Parameters: S_DEPT=ADMIN:E_DEPT=INSP:P_QTY_IN_QUEUE=YES:CP_QTY_IN_QUEUE=YES
    Data Template Code: XXKNC_WIPDJCR_DEF
    Data Template Application Short Name: CUSTOM
    Debug Flag: N
    {E_DEPT=INSP, S_DEPT=ADMIN, CP_QTY_IN_QUEUE=YES, P_QTY_IN_QUEUE=YES}
    Calling XDO Data Engine...
    [072009_082414567][][ERROR] Variable 'pwhereclause' is missing....
    [072009_082414616][][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> 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-quoted S
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:590)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1973)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2191)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2064)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2989)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:736)
         at oracle.apps.xdo.dataengine.DataTemplateParser.getRemoteValue(DataTemplateParser.java:1756)
         at oracle.apps.xdo.dataengine.DataTemplateParser.getSubstituteObject(DataTemplateParser.java:1583)
         at oracle.apps.xdo.dataengine.DataTemplateParser.replaceSubstituteVariables(DataTemplateParser.java:1404)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:440)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:429)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:300)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:266)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:205)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:237)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:364)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    --SQLException
    java.sql.SQLException: ORA-00920: invalid relational operator
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:590)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1973)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:850)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2599)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2963)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:584)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:515)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:429)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:300)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:266)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:205)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:237)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:364)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 20-JUL-2009 08:24:14
    ---------------------------------------------------------------------------

    Misra, I noticed that I misspelled my pwhereclaus parameter so I went back and corrected it. When I executed the data template I got a new error. Can you tell me what this error means or how to fix this?
    Custom Application: Version : UNKNOWN
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XXKNC_WIPDJCR_DEF module: XXKNC_WIP_XML_Data_Template
    Current system time is 20-JUL-2009 11:40:07
    XDO Data Engine Version No: 5.6.3
    Resp: 20420
    Org ID : 81
    Request ID: 3370253
    All Parameters: S_DEPT=ADMIN:E_DEPT=BIO:P_QTY_IN_QUEUE=YES:CP_QTY_IN_QUEUE=YES
    Data Template Code: XXKNC_WIPDJCR_DEF
    Data Template Application Short Name: CUSTOM
    Debug Flag: N
    {E_DEPT=BIO, S_DEPT=ADMIN, CP_QTY_IN_QUEUE=YES, P_QTY_IN_QUEUE=YES}
    Calling XDO Data Engine...
    java.lang.NullPointerException
         at oracle.apps.xdo.dataengine.DataTemplateParser.getObjectVlaue(DataTemplateParser.java:1695)
         at oracle.apps.xdo.dataengine.DataTemplateParser.replaceSubstituteVariables(DataTemplateParser.java:1414)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:440)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:429)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:300)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:266)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:205)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:237)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:364)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 20-JUL-2009 11:40:09
    ---------------------------------------------------------------------------

  • Regarding Data Template Issue

    HI All,
    I am using the Data Template to publish output.
    Based on Data Template.xdo
    <?xml version = '1.0' encoding = 'utf-8'?>
    <report version="1.1" xmlns="http://xmlns.oracle.com/oxp/xmlp" defaultDataSourceRef="CNE1">
    <title>Based on Data Template</title>
    <properties>
    <property name="showControls" value="true"/>
    <property name="online" value="true"/>
    <property name="parameterColumns" value="3"/>
    <property name="openLinkInNewWindow" value="true"/>
    <property name="autoRun" value="true"/>
    </properties>
    <dataModel defaultDataSet="New DataSet 2">
    <dataSet id="New DataSet 2">
    <dataTemplate name="MyDT" dataSourceRef="CNE1">
                        <dataQuery>
                             <sqlStatement name="Q_Emp">
                                  <![CDATA[ SELECT * FROM EMP]]>
                             </sqlStatement>
                        </dataQuery>
                   </dataTemplate>
    </dataSet>
    </dataModel>
    <valueSets/>
    <parameters/>
    <templates/>
    <burst enabled="false"/>
    </report>
    I have created the template & register the same in EBS.Also created a Concurrent Program with XDODTEXE as the executable.
    I am getting the following error :
    Custom APPS: Version : UNKNOWN
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XX_TEST_DP module: XX: Test Data template -1
    Current system time is 12-SEP-2007 00:26:25
    XDO Data Engine Version No: 5.6.3
    Resp: 20420
    Org ID : 83
    Request ID: 7440294
    All Parameters:
    Data Template Code: XX_TEST_DP
    Data Template Application Short Name: CUSTOM
    Debug Flag: N
    Calling XDO Data Engine...
    [091207_122635145][][EXCEPTION] java.lang.NullPointerException
         at oracle.apps.xdo.dataengine.DataTemplateParser.GetNodeNumChildren(DataTemplateParser.java:345)
         at oracle.apps.xdo.dataengine.DataTemplateParser.templateParser(DataTemplateParser.java:277)
         at oracle.apps.xdo.dataengine.XMLPGEN.setDataTemplate(XMLPGEN.java:599)
         at oracle.apps.xdo.dataengine.DataProcessor.setDataTemplate(DataProcessor.java:193)
         at oracle.apps.xdo.oa.util.DataTemplate.<init>(DataTemplate.java:136)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:282)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
         at com.sun.java.util.collections.ArrayList.RangeCheck(ArrayList.java:492)
         at com.sun.java.util.collections.ArrayList.get(ArrayList.java:306)
         at oracle.apps.xdo.dataengine.DataTemplateParser.getParentDataSource(DataTemplateParser.java:1737)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeDefaultGroup(XMLPGEN.java:320)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:279)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:266)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:205)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:237)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:364)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 7440294 on node SJCORCL05 at 12-SEP-2007 00:26:37.
    Post-processing of request 7440294 failed at 12-SEP-2007 00:26:44 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 12-SEP-2007 00:26:44
    Please help.
    Thanks
    Bharat B Nayak
    [email protected]

    Go to DSO -> manage.
    On content Tab, you get option for selective deletion (last button "selective").
    Mention your selections inside Delete Selection & start the job.
    This will delete the selected data only from active table.
    Please note the data from change log will not be deleted. No selective deletion is possible on Change log. However, you can delete the older change logs if not necessary. Go to Environment -> Delete Change Log Data & specify the date or days.

  • XML Publisher Datasource XML Data Template

    Hello,
    I am trying to create function (Program Units) in my XML Data template, I get the following ERROR.
    XX Custom Application: Version : UNKNOWN
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XXTESTNEW module: XX TEST Report-New
    Current system time is 13-JUL-2012 15:34:09
    0.197: [GC 0.197: [DefNew: 1777K->191K(1984K), 0.0042507 secs] 1777K->242K(6080K), 0.0043329 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    0.330: [GC 0.330: [DefNew: 1983K->44K(1984K), 0.0054729 secs] 2034K->282K(6080K), 0.0055303 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
    0.536: [GC 0.536: [DefNew: 1836K->192K(1984K), 0.0053814 secs] 2074K->591K(6080K), 0.0054403 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
    0.695: [GC 0.695: [DefNew: 1984K->138K(1984K), 0.0036150 secs] 2383K->711K(6080K), 0.0036667 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
    0.969: [GC 0.969: [DefNew: 1930K->92K(1984K), 0.0050182 secs] 2503K->802K(6080K), 0.0050735 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
    1.453: [GC 1.453: [DefNew: 1884K->192K(1984K), 0.0049133 secs] 2594K->1247K(6080K), 0.0049730 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
    1.493: [GC 1.493: [DefNew: 1962K->58K(1984K), 0.0025240 secs] 3018K->1301K(6080K), 0.0025808 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
    1.501: [GC 1.501: [DefNew: 1847K->93K(1984K), 0.0014896 secs] 3090K->1337K(6080K), 0.0015390 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    1.507: [GC 1.507: [DefNew: 1860K->70K(1984K), 0.0006978 secs] 3103K->1313K(6080K), 0.0007453 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    1.514: [GC 1.514: [DefNew: 1849K->103K(1984K), 0.0004474 secs] 3093K->1346K(6080K), 0.0004883 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    1.595: [GC 1.596: [DefNew: 1895K->138K(1984K), 0.0020285 secs] 3138K->1437K(6080K), 0.0020863 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
    1.673: [GC 1.673: [DefNew: 1930K->64K(1984K), 0.0014510 secs] 3229K->1496K(6080K), 0.0015049 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    1.759: [GC 1.759: [DefNew: 1856K->98K(1984K), 0.0014301 secs] 3288K->1530K(6080K), 0.0014835 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    1.827: [GC 1.827: [DefNew: 1890K->89K(1984K), 0.0010782 secs] 3322K->1572K(6080K), 0.0011340 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    1.880: [GC 1.880: [DefNew: 1881K->133K(1984K), 0.0011918 secs] 3364K->1616K(6080K), 0.0012450 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    1.936: [GC 1.936: [DefNew: 1925K->113K(1984K), 0.0012641 secs] 3408K->1670K(6080K), 0.0013197 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    1.990: [GC 1.990: [DefNew: 1905K->191K(1984K), 0.0022812 secs] 3462K->1976K(6080K), 0.0023401 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
    XDO Data Engine Version No: 5.6.3
    Resp: 23202
    Org ID : 43
    Request ID: 22637028
    All Parameters:
    Data Template Code: XXTESTNEW
    Data Template Application Short Name: XX
    Debug Flag: N
    2.161: [GC 2.161: [DefNew: 1983K->192K(1984K), 0.0036382 secs] 3768K->2170K(6080K), 0.0036949 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
    Calling XDO Data Engine...
    2.289: [GC 2.289: [DefNew: 1984K->192K(1984K), 0.0036540 secs] 3962K->2475K(6080K), 0.0037115 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    [071312_033411511][][EXCEPTION] java.lang.NullPointerException
         at oracle.apps.xdo.dataengine.DataTemplateParser.GetNodeNumChildren(DataTemplateParser.java:334)
         at oracle.apps.xdo.dataengine.DataTemplateParser.templateParser(DataTemplateParser.java:266)
         at oracle.apps.xdo.dataengine.XMLPGEN.setDataTemplate(XMLPGEN.java:140)
         at oracle.apps.xdo.dataengine.DataProcessor.setDataTemplate(DataProcessor.java:193)
         at oracle.apps.xdo.oa.util.DataTemplate.<init>(DataTemplate.java:245)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:282)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    2.394: [GC 2.394: [DefNew: 1365K->143K(1984K), 0.0025966 secs]2.397: [Tenured: 2451K->2381K(4096K), 0.0798821 secs] 3648K->2381K(6080K), 0.0825759 secs] [Times: user=0.08 sys=0.01, real=0.08 secs]
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
         at com.sun.java.util.collections.ArrayList.RangeCheck(ArrayList.java:492)
         at com.sun.java.util.collections.ArrayList.get(ArrayList.java:306)
         at oracle.apps.xdo.dataengine.DataTemplateParser.getParentDataSource(DataTemplateParser.java:1796)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeDefaultGroup(XMLPGEN.java:331)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:286)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    Heap
    def new generation total 1984K, used 250K [0xcc400000, 0xcc620000, 0xccb10000)
    eden space 1792K, 13% used [0xcc400000, 0xcc43ea98, 0xcc5c0000)
    from space 192K, 0% used [0xcc5c0000, 0xcc5c0000, 0xcc5f0000)
    to space 192K, 0% used [0xcc5f0000, 0xcc5f0000, 0xcc620000)
    tenured generation total 6104K, used 4381K [0xccb10000, 0xcd106000, 0xd0400000)
    the space 6104K, 71% used [0xccb10000, 0xccf57598, 0xccf57600, 0xcd106000)
    compacting perm gen total 12288K, used 7039K [0xd0400000, 0xd1000000, 0xd8400000)
    the space 12288K, 57% used [0xd0400000, 0xd0adfc88, 0xd0adfe00, 0xd1000000)
    ro space 8192K, 80% used [0xd8400000, 0xd8a73430, 0xd8a73600, 0xd8c00000)
    rw space 12288K, 59% used [0xd8c00000, 0xd9330510, 0xd9330600, 0xd9800000)
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 13-JUL-2012 15:34:11
    Please see the following Data Template, I have copied the folloing
    <report name="anyname" DTDVersion="9.0.2.0.0">
    <data>
    <dataSource name="Q_1">
    <select>
    select 1 EMPLOYEE_ID, 'FIRST_NAME' FIRST_NAME,'LAST_NAME' LAST_NAME, 1 DEPARTMENT_ID ,2 SALARY, 2 COMMISSION_PCT from dual
    </select>
    <group name="G_EMPLOYEES">
    <dataItem name="EMPLOYEE_ID"/>
    <dataItem name="FIRST_NAME"/>
    <dataItem name="LAST_NAME"/>
    <dataItem name="HIRE_DATE"/>
    <dataItem name="SALARY"/>
    <dataItem name="COMMISSION_PCT"/>
    <dataItem name="DEPARTMENT_ID"/>
    <formula name="CF_REMUNERATION" source="cf_1formula"
    datatype="number" width="20" precision="10"/>
    </group>
    </dataSource>
    <summary name="CS_REPORT_LEVEL_SUMMARY" function="sum" width="20"
    precision="10" reset="report" compute="report"/>
    </data>
    <programUnits>
    <function name="cf_1formula" returnType="number">
    <textSource>
    <![CDATA[
    function CF_1Formula return Number is
    begin
    return (:salary + nvl(:commission_pct,0));
    end;
    ]]>
    </textSource>
    </function>
    </programUnits>
    </report>
    Note:
    I have taken this from the following documentation.
    http://docs.oracle.com/cd/E12839_01/bi.1111/b32121/pbr_xml003.htm
    Regards
    Ed

    Hi,
    To me it seems that format is used in BI Publisher usined iN OBI and not Oracle XML Publisher.
    Why dont you try to get the value in sql itself like (:salary + :pct_cimssion) as abcd

  • How can I get Status of the report using after report trigger

    I want to get Status of my report on GUI . I am aware that we can look into XMLP_SCHED_OUTPUT table to get all the required details but I am not aware as how I can pull data from this table and make it available on GUI screen. Or is there any way to use jobid of the report and use in Data template of the same report?
    Any help on this will be greatly appreciated.

    What/which GUI? One of your own making? Design it and query from the table(s) of interest, and populate fields based on the results. Which job ID? The latest or one of your choosing? Add a drop down list or menu and let the user select which job. Fairly vague requirements you've listed.

  • Reg: Error in Data Template ( java.sql.SQLException: ORA-00900: invalid SQL

    Hi Experts,
    Good Morning..
    I registered the data template which i created in oracle apps and while i run that, ended in error... Plz help me..
    Step :-1 Used Data Template as below:-
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="EMP" defaultPackage="" description="Employee Data">
    - <properties>
    <property name="include_parameters" value="true" />
    <property name="include_null_Element" value="true" />
    <property name="xml_tag_case" value="upper" />
    <property name="db_fetch_size" value="500" />
    <property name="scalable_mode" value="off" />
    <property name="include_rowsettag" value="false" />
    <property name="debug_mode" value="off" />
    </properties>
    <parameters/>
    <parameters name="pdeptno" dataType="number" defaultValue=" ">
    </parameters>
    <lexicals />
    - <dataQuery>
    - <sqlStatement name="DEPT" dataSourceRef="">
    - <![CDATA[
              SELECT DEPTNO,DNAME,
              LOC,CURSOR(SELECT  EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,nvl(COMM,0) COMM from EMP ) as EMP
              from dept
              where deptno=pdeptno
              order by deptno]]>
    </sqlStatement>
    </dataQuery>
    </dataTemplate>
    Step -2:-
    Registered in xml publisher administrator
    Step -3:-
    While i am running this getting below error-
    XDO Data Engine Version No: 5.6.3
    Resp: 20419
    Org ID : 204
    Request ID: 5380496
    All Parameters: pdeptno=10
    Data Template Code: EMP_DD
    Data Template Application Short Name: FND
    Debug Flag: N
    {pdeptno=10}
    Calling XDO Data Engine...
    java.sql.SQLException: ORA-00900: invalid SQL statement
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeDefaultGroup(XMLPGEN.java:392)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:286)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Start of log messages from FND_FILE
    Any mistake i made.. Issue may be silly..plz help me...
    Thanks in advance..
    Happy

    Hi all,,,,
    Thank so much for your valuable response regarding this issue..
    Actually my scenario meet this below example, path for that example:-.
    http://blogs.oracle.com/xmlpublisher/2007/02/data_templates_without_groupin.html
    I am simply executing that data template. but getting this error :-
    XDO Data Engine Version No: 5.6.3
    Resp: 20419
    Org ID : 204
    Request ID: 5380496
    All Parameters: pdeptno=10
    Data Template Code: EMP_DD
    Data Template Application Short Name: FND
    Debug Flag: N
    {pdeptno=10}
    Calling XDO Data Engine...
    java.sql.SQLException: ORA-00900: invalid SQL statement
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeDefaultGroup(XMLPGEN.java:392)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:286)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Start of log messages from FND_FILE

  • Before report trigger execution sequence

    Hi,
    What is the execution sequence of the before report trigger ?
    In the report builder help, the definition says "The Before Report trigger fires before the report is executed *but after queries are parsed and data is fetched*."
    But the oracle document "Oracle iDS Reports: Build Internet Reports: Volume 2: Student Guide" says
    "Before a report executes; *after queries are parsed, but before records are fetched*
    I have built a report where, i am populating a table A with some data in the before report trigger. The data model query is a "select * from A ". But the report o/p is blank since the before report trigger was fired after the query was parsed and fetched. My understanding is that the queries should only be parsed but not fetched before the "before report trigger"
    Regards,
    Suresh

    Hi,
    this is an important question.
    In fact the online help is right: Before its execution the query is parsed and data fetching is strarted.
    Thus any plsql operation that may influence the query and the data accessed is too late in the BEFOREREPORT trigger.
    THe issue is that there is no error message or warning. THe problem scenario bandwidth is wide: From "no problem at all" to constant or intermittent error scenarios or worst case unrecognized problems like missing records or any strange behavior in the layout.
    So very carefull while using BEFOREREPORT trigger
    Ciao
    Markus

  • Concurrent program XML Data template error.

    Internal Controls Manager: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XX_EMP module: xx_emp_cP
    Current system time is 10-JAN-2009 08:41:41
    XDO Data Engine Version No: 5.6.3
    Resp: 20420
    Org ID : 101
    Request ID: 814249
    All Parameters: p_DeptNo=10
    Data Template Code: XX_EMP
    Data Template Application Short Name: AMW
    Debug Flag: N
    {p_DeptNo=10}
    Calling XDO Data Engine...
    java.lang.NullPointerException
         at oracle.apps.xdo.oa.util.DataTemplate.getDataTemplate(DataTemplate.java:281)
         at oracle.apps.xdo.oa.util.DataTemplate.<init>(DataTemplate.java:133)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:282)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)

    this is XML publisher error.
    Please post the message in XML publisher forum
    --Prjasanna                                                                                                                                                                                       

  • Data Template - PLS-00302: component 'P_PARAMETER' must be declared

    All,
    I'm new to the Data Template. I'm following the User's Guide example and examples from this Forum. I can't get a parameter to work. I'm creating a Data Template because I need to execute a PL/SQL call before the report runs.
    My Data Template:
    <?xml version="1.0" encoding="UTF-8" ?>
    <dataTemplate name="DATA_TEMPLATE" version="1.0" dataSourceRef="dev" defaultPackage="TEST_JC_PKG">
    <dataTrigger name="beforeReport" source="TEST_JC_PKG.record_report_usage('beforeReport_trigger')"/>
    <parameters>
    <parameter name="p_parameter" datatype="character" defaultValue="X"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="ROW">
    <![CDATA[SELECT dummy FROM dual WHERE :p_parameter = 'X']]>
    </sqlStatement>
    </dataQuery>
    </dataTemplate>
    I get this error when I click the "View" button in BI Pub:
    ORA-06550: line 2, column 13:
    PLS-00302: component 'P_PARAMETER' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    xdo:
    <?xml version = '1.0' encoding = 'utf-8'?>
    <report version="1.1" xmlns="http://xmlns.oracle.com/oxp/xmlp" defaultDataSourceRef="dev">
    <title>beforeReport_trigger_manual_dataTemplate</title>
    <properties>
    <property name="showControls" value="true"/>
    <property name="online" value="true"/>
    <property name="parameterColumns" value="3"/>
    <property name="openLinkInNewWindow" value="true"/>
    <property name="autoRun" value="true"/>
    </properties>
    <dataModel defaultDataSet="Q1">
    <dataSet id="Q1">
    <dataTemplate name="DATA_TEMPLATE" dataSourceRef="dev" defaultPackage="TEST_JC_PKG">
         <dataTrigger name="beforeReport" source="TEST_JC_PKG.record_report_usage('beforeReport_trigger_manual_dataTemplate')"/>
         <parameters>
         <parameter name="p_parameter" datatype="character" defaultValue="X"/>
         </parameters>
    <dataQuery>
    <sqlStatement name="ROW">
    <![CDATA[SELECT dummy FROM dual WHERE :p_parameter = 'X']]>
    </sqlStatement>
    </dataQuery>
    </dataTemplate>
    </dataSet>
    </dataModel>
    <valueSets/>
    <parameters/>
    <templates default="detail">
    <template label="detail" type="rtf" url="beforeReport_trigger_manual_dataTemplate.rtf"/>
    </templates>
    <burst enabled="false"/>
    </report>

    Hi,
    This is a known bug when using DataTemplates, but it has only just started with 10.1.3.3. You will need to put p_parameter as a global variable in you default package, and you will also need to create a parameter called p_parameter inside BIP. You can set this parameter to being hidden if you do not want Users to be able to change it.
    See Tim Dexter's blog on this for more information:
    http://blogs.oracle.com/xmlpublisher/2007/10/18#a614
    Hope this helps you.
    Regards,
    Cj

Maybe you are looking for

  • How to get all available VM OS details from my Hyper-v-host?

    HI, I have one VM Server in my windows 8 machine, in that I have 2 vm'. Now I want to find alll vm's os detials? Thanks in advance. A Pathfinder. If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful" Best O

  • System.exit(0); reboots PC..........

    Hello all, I compiled and ran this program with no problems about 5 or 6 times as soon as I finished writing it. I walked away for about 15 minutes and tryed to run it again. The program runs fine up until the end; now, however, at the System.exit(0)

  • Can't send text to a certain international phone number.

    I've been having trouble sending a message to an internaional number on my Iphone 4S IOS 5.0.0. I can call this person, and receive texts from this person, but i'm not able to send. I can also send texts to other numbers from the same country. Howeve

  • 9.0.3 two web services questions

    OK, I'm trying to get web services to work and having two problems. The (hopefully) simple one: I want to install a web service on the local OC4J, and I can't seem to get the connection to work. Getting connection refused. Not sure why. Didn't see an

  • How to check who has edited the meeting invites on calendar

    Hi, we are in exchange server 2010 environment. How do we check who has edited the meeting invites on calendar?  I tried with get-calendardiganosticlog. But no help.. Sankar M http://messagingdevelopment.blogspot.in/