Before Report Function

Hello,
I have the following function witch I need to run before report I mean when ever I press on the submit button (GO). The value returned from the function should be stored in an item i.e P2_Begining_Balance.
function BeforeReport return boolean is
var_pos     number(15,3) ;
var_neg     number(15,3) ;
beg_bal     number(15,3) ;
Begin
begin
select sum (nvl(amount,0)) into beg_bal
     from EMPLOYEE_TRANSACTI
     where ( type = 92 )
     and to_char(from_date,'YYYY')=to_char(date0,'YYYY')
     and FK_EMPLOYEENUMBER0=emp_code;
EXCEPTION
     WHEN NO_DATA_FOUND THEN
     beg_bal := 0;
end;
begin
     select      sum(nvl(amount,0)) into var_pos
     from      EMPLOYEE_TRANSACTI
     where      
TYPE=72
     and      fk_vouchervalue_da<from_date
     and      fk_vouchervalue_da>= trunc(from_date,'year')
     and      FK_EMPLOYEENUMBER0=emp_code;
EXCEPTION
     WHEN NO_DATA_FOUND THEN
     var_pos := 0;
end;
Begin     
     var_neg :=0;
     balance :=nvl(beg_bal,0) + nvl(var_pos,0) - nvl(var_neg,0);
     return(true);
EXCEPTION
     WHEN NO_DATA_FOUND THEN
     balance :=nvl(beg_bal,0) + nvl(var_pos,0) - nvl(var_neg,0);
          RETURN (TRUE);
end;
RETURN NULL; end;
Thanks,
Ribhi

Hi Ashif,
I'm trying to create an employee transaction report. This report looks like the following:
Date From: DD/MM/YYYY Date To: DD/MM/YYYY Employee Number: Go
Beginning Balance: 2025
Voucher No Voucher Date Description Debit Credit Total Balance
123 01/01/2008 xxxxxxxxx 1154.961 870.039
124 02/01/2008 bbbbbbbbb 870.039 000
125 05/03/2008 cccccccccc 3350 3350
The before report function suppose to run when ever I press the submit the report to calculate my beginning balance i.e 2025 witch is gonna be used im my report body calculation Total Balance.
Hope that explains what I'm trying to do.
Thanks for your help
Ribhi

Similar Messages

  • 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

  • Before Report Trigger error

    Hi,
    I'm trying to run an update in the Before Report Trigger of a report but I keep getting a fatal error message PLSQL: Function returned without value. Do I have the syntax wrong ?
    function BeforeReport return boolean is
    begin
    update trp_a set val_id = 1 where xrt is null
    commit;
    end;
    thanks

    Hi
    I am getting error ORA 06503 - PL SQL function returned without value.
    This is the function that is defined in oracle report in the "before report" trigger
    function BeforeReport return boolean is
    begin
         :CP_BATCH_NAME := ' AND BATCH_NAME= ' ||''''|| :P_BATCH_NAME || ' ' ;
    if Rtrim(LTRIM(:P_BATCH_NAME)) is not null then
    end if;
    return (TRUE);
    end;
    END;
    Pls help

  • Before Report Trigger Running Endlessly

    Hi all,
    I got the following query in my before report trigger. But the system is running endlessly without stop. Any advise is appreciated.
    function AfterReport return boolean is
    begin
    delete chart_temp;
    COMMIT;
    IF :P_1 IS NOT NULL THEN
         INSERT INTO CHART_TEMP VALUES ( :PERIOD1, :M1 );
    ELSE
    IF :P_2 IS NOT NULL THEN
    INSERT INTO CHART_TEMP VALUES ( :PERIOD2, :M2 );
    END IF;
    END IF;
    COMMIT;
    return (TRUE);
    end;
    rgds
    Lim

    Rules-wise, you have the beforeReport trigger before the dataStructure, and that is correct. Syntax, the parameter is going in okay. Question is then the logic or data. Does the function work outside of this? That is, if you were to exec the function in an anonymous block of PL/SQL, do you get the desired output (i.e., test for boolean value returned)?

  • Before Report Trigger Not Firing

    Hi Trying to Fire before report trigger in this piece of code, Calling in on XML Publisher 5.6.3 and running on XDODTEXE
    The function its calling is a boolean... Can anyone see a problem with the xml calling the function....
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <dataTemplate name="EXPENSES" defaultpackage="OO_HR_OO_GENERAL" version="1.0">
    <parameters>
    <parameter name="P_VACANCY_ID" dataType = "number" defaultValue=""></parameter>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT
    PPD.SEGMENT16 UPN
    ,(SELECT meaning
    FROM fnd_lookup_values
    WHERE lookup_type = 'NR_REORG_NAME'
    AND lookup_code = pos.attribute21) RE_ORG_NAME
    ,pv.name VACANCY_NAME
    ,HR_GENERAL.DECODE_JOB(PV.JOB_ID) JOB_NAME
    ,HR_GENERAL.DECODE_ORGANIZATION(PV.ORGANIZATION_ID) DEPT
    ,PANEL_MEMBERS.PANEL_MEMBER
    ,PANEL_MEMBERS.PANEL_START_TIME
    ,PANEL_MEMBERS.PANEL_START_DATE
    ,PANEL_MEMBERS.INTERVIEW_LOC
    from hr_all_positions_f POS,
    per_position_definitions PPD,
    PER_ALL_VACANCIES PV,
    (SELECT prec2.attribute4 PANEL_MEMBER
    ,prec2.attribute2 PANEL_START_TIME
    ,to_char(fnd_date.canonical_to_date(prec2.attribute1),'DD-MON-YYYY') PANEL_START_DATE
    ,hr_general.decode_location(prec2.attribute3) INTERVIEW_LOC
    ,PREC1.VACANCY_ID
    FROM
    PER_RECRUITMENT_ACTIVITY_FOR PREC1,
    per_recruitment_activities PREC2
    WHERE PREC1.RECRUITMENT_ACTIVITY_ID = PREC2.RECRUITMENT_ACTIVITY_ID
    and sysdate between prec2.date_start and nvl(sysdate,prec2.date_end)
    and prec2.date_start = (select max(prec3.date_start)
    from per_recruitment_activities prec3,
    PER_RECRUITMENT_ACTIVITY_FOR prec4
    where prec3.RECRUITMENT_ACTIVITY_ID = prec4.RECRUITMENT_ACTIVITY_ID
    and prec3.attribute4 is not null
    and PREC4.VACANCY_ID = PREC1.VACANCY_ID)) PANEL_MEMBERS
    where sysdate between pos.effective_start_date and pos.effective_end_date
    and pos.status = 'VALID'
    and ppd.position_definition_id = pos.position_definition_id
    and pv.position_id = pos.position_id
    and pv.vacancy_id = panel_members.vacancy_id(+)
    AND PV.VACANCY_ID = :P_VACANCY_ID]]>
    </sqlStatement>
    <sqlStatement name="Q2">
    <![CDATA[SELECT pos.name position_name
    ,PPD.SEGMENT16 UPN
    ,PPD.SEGMENT17 FUNCTION
    ,PPD.SEGMENT18 ROUTE
    ,PPD.SEGMENT19 DELIVERY_UNIT
    ,(select FVT.DESCRIPTION
    from fnd_flex_value_SETS fvs,
         fnd_flex_values fv,
         fnd_flex_values_tl fvt
    WHERE fvs.flex_value_set_name = 'NR_Safety_Critical_Indicator'
    AND fv.flex_value_set_id = fvs.flex_value_set_id
    and fv.flex_value_id = fvt.flex_value_id
    AND fvt.LANGUAGE = USERENV ('LANG')
    and fv.flex_value = POS.ATTRIBUTE2) SAFETY_INDICATOR
    ,pv.name vacancy_name
    ,PV.VACANCY_ID
    ,HR_GENERAL.DECODE_GRADE(PV.GRADE_ID) VACANCY_GRADE
    ,HR_GENERAL.DECODE_JOB(PV.JOB_ID) Job_name
    ,APL.LAST_NAME
    ,APL.FIRST_NAME
    ,APL.EMP_APL_NUMBER
    ,APL.EMP_GRADE
    ,APL.re_org_status
    from hr_all_positions_f POS,
         per_position_definitions PPD,
         PER_ALL_VACANCIES PV,
         (SELECT pv.vacancy_id
         ,PPF.LAST_NAME
         ,PPF.FIRST_NAME
         ,NVL(PPF.APPLICANT_NUMBER,EMPLOYEE_NUMBER) EMP_APL_NUMBER
         ,HR_GENERAL.DECODE_GRADE((SELECT PAF2.GRADE_ID
           FROM PER_ALL_ASSIGNMENTS_F PAF2
           WHERE PAF2.PERSON_ID = PAF1.PERSON_ID
           AND PAF2.ASSIGNMENT_TYPE = 'E'
           AND SYSDATE BETWEEN PAF2.EFFECTIVE_START_DATE AND PAF2.EFFECTIVE_END_DATE
           AND ROWNUM = 1)) EMP_GRADE
         ,(SELECT fl.meaning REORG_STATUS
      FROM apps.per_person_analyses ppa,
           apps.per_analysis_criteria pac,
           apps.per_special_info_types_v psi,
           fnd_lookup_values FL
    WHERE ppa.id_flex_num = pac.id_flex_num
       AND ppa.analysis_criteria_id = pac.analysis_criteria_id
       AND psi.id_flex_num = ppa.id_flex_num
       AND psi.NAME = 'Re-Organisation Details'
       and fl.lookup_type = 'NR_REORG_APPSTATUS'
       and fl.lookup_code = pac.segment2
       and ppa.person_id = ppf.person_id
       and rownum = 1) re_org_status
      FROM  PER_ALL_ASSIGNMENTS_F PAF1,
            PER_ALL_PEOPLE_F PPF,
            PER_ALL_VACANCIES PV
      WHERE PAF1.ASSIGNMENT_TYPE = 'A'
        AND SYSDATE BETWEEN PAF1.EFFECTIVE_START_DATE AND PAF1.EFFECTIVE_END_DATE
        AND SYSDATE BETWEEN PPF.EFFECTIVE_START_DATE AND PPF.EFFECTIVE_END_DATE
        AND PAF1.PERSON_ID = PPF.PERSON_ID
        AND PAF1.VACANCY_ID = PV.VACANCY_ID) apl
    where sysdate between pos.effective_start_date and pos.effective_end_date
    and pos.status = 'VALID'
    and ppd.position_definition_id = pos.position_definition_id
    and pv.position_id = pos.position_id
    and pv.vacancy_id = apl.vacancy_id(+)
    AND PV.VACANCY_ID = :P_VACANCY_ID]]>
    </sqlStatement>
    <sqlStatement name="Q3">
    <![CDATA[SELECT    (SELECT ppf2.first_name||' '||PPF2.Last_name||', '||ppf2.employee_number||', '||ppd2.segment17||', '||ppd2.segment18||', '||ppd2.segment19 employee_number
       FROM PER_ALL_ASSIGNMENTS_F PAF2,
            PER_ALL_PEOPLE_F PPF2,
            HR_ALL_POSITIONS_F POS2,
            PER_POSITION_DEFINITIONS PPD2
       WHERE PAF2.PERSON_ID = PPF2.PERSON_ID
       AND PAF2.POSITION_ID = POS2.POSITION_ID
       and ppd2.position_definition_id = pos2.position_definition_id    
        AND SYSDATE BETWEEN ppf2.effective_start_date AND ppf2.effective_end_date
       AND SYSDATE BETWEEN paf2.effective_start_date AND paf2.effective_end_date
       AND SYSDATE BETWEEN pos2.effective_start_date AND pos2.effective_end_date
       AND PAF2.ASSIGNMENT_TYPE = 'E'
       AND PAF2.PERSON_ID = PAF.PERSON_ID) employee_number,
           pos.NAME "CURRENT_POS",
           PAF.PERSON_ID,
           XXNR_HR_COPP_GENERAL.VAC_NAME(pac.segment3)||' - ' "VAC_PREF1",
           XXNR_HR_COPP_GENERAL.VAC_POS(pac.segment3) "VAC_PREF1_POS_NAME",
           XXNR_HR_COPP_GENERAL.VAC_NAME(pac.segment4)||' - ' "VAC_PREF2",
           XXNR_HR_COPP_GENERAL.VAC_POS(pac.segment4) "VAC_PREF2_POS_NAME",
           XXNR_HR_COPP_GENERAL.VAC_NAME(pac.segment5)||' - ' "VAC_PREF3",
           XXNR_HR_COPP_GENERAL.VAC_POS(pac.segment5) "VAC_PREF3_POS_NAME",
           (SELECT LOCATION_CODE
            FROM HR_LOCATIONS WHERE LOCATION_ID = pac.segment15
            AND ROWNUM = 1) "REORG_ADMIN_OFFICE",
           (SELECT LOCATION_CODE
            FROM HR_LOCATIONS WHERE LOCATION_ID = pac.segment18
            AND ROWNUM = 1) "PREF_LOCATION",
           pac.segment19 "WILL_RELOCATE",
           pac.segment20 "LOCATION_TO_RELOCATE"
      FROM apps.per_people_f ppf,
           apps.per_assignments_f paf,
           apps.hr_all_positions_f pos,
           apps.per_person_analyses ppa,
           apps.per_analysis_criteria pac,
           apps.per_special_info_types_v psi,
           apps.per_vacancies pv
    WHERE ppf.person_id = ppa.person_id
       AND SYSDATE BETWEEN ppf.effective_start_date AND ppf.effective_end_date
       AND SYSDATE BETWEEN paf.effective_start_date AND paf.effective_end_date
       AND SYSDATE BETWEEN pos.effective_start_date AND pos.effective_end_date
       AND ppf.person_id = paf.person_id
       and paf.vacancy_id = pv.vacancy_id
       AND paf.position_id = pos.position_id
       AND pos.status = 'VALID'
       AND paf.assignment_type = 'A'
       AND ppa.id_flex_num = pac.id_flex_num
       AND ppa.analysis_criteria_id = pac.analysis_criteria_id
       AND psi.id_flex_num = ppa.id_flex_num
       AND psi.NAME = 'Re-Organisation Details'
       AND PV.VACANCY_ID = :P_VACANCY_ID]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="beforeReport" source="OO_HR_OO_GENERAL.submit_request_22(:P_VACANCY_ID)"/>
    <dataStructure>
    <group name="PANEL_MEM_LIST" source="Q1">
    <element name="PANEL_MEMBER" value ="PANEL_MEMBER"/>
    <element name="PANEL_START_TIME" value ="PANEL_START_TIME"/>
    <element name="INTERVIEW_LOC" value ="INTERVIEW_LOC"/>
    <element name="PANEL_START_DATE" value ="PANEL_START_DATE"/>
    <element name="UPN" value ="UPN"/>
    <element name="RE_ORG_NAME" value ="RE_ORG_NAME"/>
    <element name="VACANCY_NAME" value ="VACANCY_NAME"/>
    <element name="JOB_NAME" value ="JOB_NAME"/>
    <element name="DEPT" value ="DEPT"/>
    </group>
    <group name="LIST_OF_EMPS" source = "Q2">
    <element name="POSITION_NAME" value ="POSITION_NAME"/>
    <element name="UPN" value ="UPN"/>
    <element name="VACANCY_GRADE" value ="VACANCY_GRADE"/>
    <element name="FUNCTION" value ="FUNCTION"/>
    <element name="ROUTE" value ="ROUTE"/>
    <element name="DELIVERY_UNIT" value ="DELIVERY_UNIT"/>
    <element name="SAFETY_INDICATOR" value ="SAFETY_INDICATOR"/>
    <element name="VACANCY_NAME" value ="VACANCY_NAME"/>
    <element name="VACANCY_ID" value ="VACANCY_ID"/>
    <element name="JOB_NAME" value ="JOB_NAME"/>
    <element name="LAST_NAME" value ="LAST_NAME"/>
    <element name="FIRST_NAME" value ="FIRST_NAME"/>
    <element name="EMP_APL_NUMBER" value ="EMP_APL_NUMBER"/>
    <element name="EMP_GRADE" value ="EMP_GRADE"/>
    <element name="RE_ORG_STATUS" value ="RE_ORG_STATUS"/>
    <element name="EMP_GRADE" value ="EMP_GRADE"/>
    <element name="RE_ORG_STATUS" value ="RE_ORG_STATUS"/>
    </group>
    <group name="LIST_OF_EMPS_PREFS" source = "Q3">
    <element name="EMPLOYEE_NUMBER" value ="EMPLOYEE_NUMBER"/>
    <element name="CURRENT_POS" value ="CURRENT_POS"/>
    <element name="VAC_PREF1_POS_NAME" value ="VAC_PREF1_POS_NAME"/>
    <element name="VAC_PREF2_POS_NAME" value ="VAC_PREF2_POS_NAME"/>
    <element name="VAC_PREF3_POS_NAME" value ="VAC_PREF3_POS_NAME"/>
    <element name="VAC_PREF1" value ="VAC_PREF1"/>
    <element name="VAC_PREF2" value ="VAC_PREF2"/>
    <element name="VAC_PREF3" value ="VAC_PREF3"/>
    <element name="REORG_ADMIN_OFFICE" value ="REORG_ADMIN_OFFICE"/>
    <element name="PREF_LOCATION" value ="PREF_LOCATION"/>
    <element name="WILL_RELOCATE" value ="WILL_RELOCATE"/>
    <element name="LOCATION_TO_RELOCATE" value ="LOCATION_TO_RELOCATE"/>
    </group>
    </dataStructure>
    </dataTemplate>
    Edited by: Sharky on Jun 23, 2009 5:02 AM

    Rules-wise, you have the beforeReport trigger before the dataStructure, and that is correct. Syntax, the parameter is going in okay. Question is then the logic or data. Does the function work outside of this? That is, if you were to exec the function in an anonymous block of PL/SQL, do you get the desired output (i.e., test for boolean value returned)?

  • Difference between After parameter Trigger and befor report Trigger

    hi,
    Can anyone tell me Functional difference between After parameter Trigger and Before Report Trigger. with some practical example or scenario.
    I did try few things but I couldn't make out any difference.
    thanks
    ram

    Probably none at this point.
    We pass parameters from a form (and do not use the report param selection screen), but always run code in the afterpform.
    put your parameter form code processing in the afterpform. I rarely ever use before report.
    The order is as expected:
    before pform
    param form
    after pform
    before report
    report
    --between pages during report run
    after report

  • Report generation Toolkit: Excel report functions error -2146827284

    Hi,
    I'm trying to create an automated report using excel functions from the report generation toolkit in labVIEW. When I run the program that generates the report first time round (the report consists of several worksheets, each worksheet is added onto the report at a diffferent state in a state machine) it always works fine and no error is generated. However, when I run the program again it will infrequently (sometimes it does, other times it will not) generate the undefined error -2146827284, this is coming from one of the excel report functions and it cannot find it on highlight execution mode.
    Does anyone know anything about this error, why it occurs, how to prevent it?
    I would appreciate any help.
    Thanks,
    Rowan

    mebels_cti wrote:
    Found something that helped; https://forums.ni.com/t5/LabVIEW/Error-code-quot-2146827284-quot-when-trying-to-open-an-Excel/m-p/20...
    Excel still open
    So I added this;
    You should use the Application Quit method instead of killing the task. I doubt this is the cause of your issue.
    Ben64

  • MS office report function does not work after building the appication

    I use the MS office report function  with a custom excel template my application.
    It works properly in de developstate, but after building the application it does not work .
    I use office 2000  and Windows XP

    jmq wrote:
    I use the MS office report function  with a custom excel template my application.
    It works properly in de developstate, but after building the application it does not work .
    What error message if any did you get? It could be a couple things:
    1. Did you include the Report Toolkit's dynamic vis in the app's build process?
    Ref: Error 7 when Running an .EXE Using VIs from Report Generation Toolkit for MS Office
    2. How are you giving the path to you custom template, as a relative or an absolute path? The path will be different for the .exe. You have to strip twice.
    Ref: Why Can't My Executable Load My Included File When I Use Relative Path Encoding?
    =====================================================
    Fading out. " ... J. Arthur Rank on gong."

  • Code in before report getting executed but "Job error is: BIP job failed."

    Customer is executing a BIP job that fires a pl/sql procedure via before report trigger. Procedure is completing successfully. But the BIP report is not getting generated. ESS process ends in error with the following error:
    oracle.as.scheduler.ExecutionErrorException: ESS-07033 Job logic indicated a system error occurred while executing an asynchronous java job for request 604103. Job error is: BIP job failed.
         at oracle.as.scheduler.rp.AsyncFinalizeProcessor.processFinalizeRequest(AsyncFinalizeProcessor.java:131)
         at oracle.as.scheduler.rp.AsyncJavaSysExecWrapper.finalizeExecution(AsyncJavaSysExecWrapper.java:250)
         at oracle.as.scheduler.rp.EndpointProcessor.finalizeExecute(EndpointProcessor.java:1018)
         at oracle.as.scheduler.rp.EndpointProcessor.finalizeExecuteWrapper(EndpointProcessor.java:980)
         at oracle.as.scheduler.adapter.EndpointImpl.finalizeExecute(EndpointImpl.java:561)
         at oracle.as.scheduler.ejb.EssAppEndpointBean.finalizeExecute(EssAppEndpointBean.java:162)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy197.finalizeExecute(Unknown Source)
         at oracle.as.scheduler.ejb.ESSAppEndpoint_t596cy_MDOImpl.__WL_invoke(Unknown Source)
         at weblogic.ejb.container.internal.MDOMethodInvoker.invoke(MDOMethodInvoker.java:35)
         at oracle.as.scheduler.ejb.ESSAppEndpoint_t596cy_MDOImpl.finalizeExecute(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.as.scheduler.adapter.ra.rdp.RequestProcessor.invokeFinalizeExecute(RequestProcessor.java:8133)
         at oracle.as.scheduler.adapter.ra.rdp.RequestProcessor.execStage_Finalize(RequestProcessor.java:7331)
         at oracle.as.scheduler.adapter.ra.rdp.RequestProcessor.process_execute(RequestProcessor.java:4813)
         at oracle.as.scheduler.adapter.ra.rdp.RequestProcessor.dispatchHandler(RequestProcessor.java:2833)
         at oracle.as.scheduler.adapter.ra.rdp.RequestProcessor.processExecuteEvent(RequestProcessor.java:696)
         at oracle.as.scheduler.adapter.ra.rdp.RequestProcessor.processUpdateEvent(RequestProcessor.java:1345)
         at oracle.as.scheduler.adapter.ra.WorkUnitWorkerBase.processWork(WorkUnitWorkerBase.java:199)
         at oracle.as.scheduler.adapter.ra.WAWorker.run(WAWorke...
    Any tips/pointers on possible issues? Could this be a template corruption?

    Any reply for the above error please.I do have the same issue.
    Please suggest.

  • Difference between AFTER PARAMETER FORM and BEFORE REPORT in Reports 6i

    Hi Aii,
    What is the difference between AFTER PARAMETER FORM and BEFORE REPORT in Reports 6i.
    Thanks in Advance,
    Balu

    Hi Balu.,
    As per my findings the After Parameter is fired after the Parameters are given to the report and Before Report fires when the queries are parsed and data is fetched.
    Regards.,
    Vijay G

  • BUG Before/After Function stopped working after Convert Photo to DNG

    Hi,
    I just converted all my photos to DNG using Lightroom's Convert Photo to DNG function and the Before/After " \ " function (in Develop module) is not working anymore... same problem in Lightroom 3.0
    regards,
    Danny

    I processed a Nikon .nef raw file in Lightroom
    .  Then I went to the Library Module under
    Library and chose Convert to DNG.  After the conversion
    the complete history was still available.  However, the Before/After function using \ or Before/After Views did not work.  It was necessary to click on the History State to compare views.  Using the Before/After Views, the original could be compared to the processed view by clicking on the Import state.
    This will not be a problem if the files are converted to DNG during initial import.
    I also recommend backing up originals and all processed files along with the Lightroom database on a least two drives on location and another off-site.

  • Oracle Apps - How to create a table before report execution?

    Hi,
    I'm new to oracle apps, I created a procedure to get some values for a report and created a query to get the remaining values. Now I need to populate those values into a temporary table and after the report execution I have to delete the table. In apps there is no before parameter form. If any one can help me, that will great.
    Thanks in advance.

    Hi,
    Do you really need to create a table INSIDE the report? It doesn't look like a good idea to me. For instance, what happens if 2 users try to execute the report at the same time? I would create a global temporary table before any execution of the report, and then I would just populate the data in the table in the 'Before Report' trigger. The data in a global temporary table is only visible at session level, so you wouldn't have any problems with multiple users executing the report at the same time and the data disappears once you finish your session, so you don't need to take care of deleting the data.
    Hope it helps.

  • Before report triggers in crystal

    Post Author: vdm
    CA Forum: Data Connectivity and SQL
    Hi,
    I need to develop a report the data for which cannot be easily selected from tables using a sql statement. It needs to first call a stored procedure which would populate some temp tables and crystal would then report from these temp tables.I am from Oracle reports background which has a before report trigger in which you could put any of this pre-processing but not sure if crystal (CR XI) has the equivalent of that.what I did try with crystal was this :- 1. On my main report I have this query - select * from temp......2.I have put a sub-report in my Report Header section. This sub-report calls a sql server stored procedure which populates the temp table.But what I am finding is that before the sub-report is called crystal has already executed the select statement -which is still empty at this stage.Question:1.What I am trying to do is just not possible to do in crystal ?2. Or is there a way that I can stop crystal from executing the main select statement until the sub-report has been called ?thanks in advanceVishal 

    Post Author: bettername
    CA Forum: Data Connectivity and SQL
    Why not just use a single Command object as your datasource, and have it contain the following sql:
    exec sp_your_stored_procedure
    --that should have generated your temp_table
    select * from your_temp_table
    drop table your_temp_table --or not, depending on your preference...

  • 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

  • Drill down reports from Before Report Trigger

    Hallo,
    I am using reports 6.08 and I want to run several subreports from the parameter form of a master report. However when I call srw.run_report() from the Before Report Trigger with batch=no I get the error message ... When I use batch=yes I cannot use destype=srcreen. When I use the same call from a button trigger it works fine.
    How can I call a drill down report from the Before Report Trigger?
    The master report should not create a report itself; only the drill down report should be visible. How can I exit the master report without raising an exception after running the drill down report?
    Thanks a lot - Ulrich

    Ulrich,
    The only place where it is valid to call a report using srw.run_report() with a destype=Screen (or Preview) is from a button of an already run report (to provide drill down capabilities).
    In your situation where you're really only using Reports as a parameter form (in the master case) I would suggest that you look to use a real Oracle Form as the master driver, and run_product calls to generate the required reports.
    Hope this helps,
    Danny

Maybe you are looking for