Formula column equivalent in Data Template

Hi all,
I'm working with my first data template and fumbling my way through. I was able to generate the XML output and apply my template. I have some idea on how to burst too, but I'm stuck on how to get the current user's email address. In Oracle Reports, I could just create a formula column and get any specific information needed. How do I do the same in Data Templates?
TIA,
Alka

HI,
Can I know How can we create the formula column like if then else logic in the Data template?
Regards
Boopathi

Similar Messages

  • Formulas in XML data template

    Hi All,
    I am unable to keep some formulas in xml data template.
    My exact requirement:
    I want to keep some formula columns in xml data template so that i can show them in rtf.
    I have 6 columns
    1. ename
    2. dept
    3. job
    4. salary
    5. salary deposited till current year ( this is a formula column)
    6. total salary ( this is a formula column ==> salary * comm)
    I am able to keep all the 4 columns and data is being displayed correctly. But i am not knowing where and how to keep the below columns *(i.e., 5 & 6)
    Glad if anyone can provide me with some examples how to keep formula columns in xml data template
    Thanks

    user9092293,
    when you mean "unable to keep column formulas" in data template!!! are you not able to refer to them within the data structure element?? or are you trying to calculate them in the group elements and not able to???
    If you could explain further it might helps us visualize your issue....
    thanks
    -bifacts

  • Formula Column in Report template

    I have a report template to use in all the report. I want to have a formula column on it to take a control value(location/Organization) where the report is being printing. Is it possible to have a formula column in a report template? if it possible how can I do it? otherwise how can i achieve this task?
    Thank in advance
    Muza.

    What is the application release?
    Can you find any details about the error in the OPP log file?
    Please search MOS website for "Cannot view XML input using XSL style sheet" and go through the docs.
    Thanks,
    Hussein

  • Sum of Elements in Data Template

    Dear Members,
    I am developing a report using Oracle BI Publisher 10.1.3.
    We are on E-Business Suite R12. I am using Data Template to Generate xml.
    Following is my element structure in Data Template:
    <dataTrigger name="afterParameterFormTrigger" source="XX_TEST_PKG.afterpform" />
    <dataStructure>
      <element name="P_REQUEST_ID" dataType="number" value="XX_TEST_PKG.P_REQUEST_ID" />
         <group name="G_PRODUCT" source="Q_MAIN">
           <element name="PROD_ITEM" dataType="varchar2" value="prod_item" />
           <element name="PROD_DESCR" dataType="varchar2" value="prod_descr" />
           <element name="PROD_ORGANIZATION_ID" dataType="number" value="prod_organization_id" />
           <element name="PROD_ITEM_TYPE" dataType="varchar2" value="prod_item_type" />
           <element name="prod_resources" dataType="number" value="prod_resources" />
           <element name="CS_TOTAL_EXT_COST" function="sum" dataType="number" value="G_ING.EXT_COST" />
            <element name="PERIOD_CODE" dataType="varchar2" value="period_code" />
               <group name="G_ING" source="Q_MAIN">
                   <element name="LINE_NO" dataType="number" value="LINE_NO" />              
                   <element name="LINE_TYPE" dataType="number" value="LINE_TYPE" />
                   <element name="ING_ITEM" dataType="varchar2" value="ING_ITEM" />
                   <element name="ING_ITEM_ID" dataType="number" value="ING_ITEM_ID" />
                   <element name="ING_DESCR" dataType="varchar2" value="ING_DESCR" />
                   <element name="ING_ORGANIZATION_ID" dataType="number" value="ING_ORGANIZATION_ID" />
                   <element name="QTY" dataType="number" value="QTY" />
                   <element name="ING_COST" dataType="number" value="ING_COST" />
                   <element name="EXT_COST" dataType="number" value="EXT_COST" />
               </group>
        </group>
    </dataStructure>I want to sum elements by name CS_TOTAL_EXT_COST and prod_resources and put that value under G_PRODUCT.
    I tried the following but it did not work:
    <element name="SUM_TEST" dataType="number" value="XX_TEST_PKG.SUM_TESTING(:CS_TOTAL_EXT_COST,:prod_resources)" /> XX_TEST_PKG.SUM_TESTING is a function which sums the input parameters.
    In report Builder this was very easy. I would have created a formula column and summed up what ever elements i want. I am not sure how do we do this in Data Template?
    Thanks
    Sandeep

    Any Ideas on how to Achieve the Sum of a Summary Column(CS_TOTAL_EXT_COST) and a Column(prod_resources) using data template?
    As i mentioned before in reports builder, this can be achieved by creating a formula column and summing both columns.
    I am not able to understand how do we do this in Data Template?
    I can also sum those elements in MSWord Rtf Template, but are there any other options.
    Thanks
    Sandeep

  • Report Builder chrashes when creating a new formula column

    Dear all,
    whenever I try to create a new formula column in the data model, that is placed outside of a query, my report builder crashes completely. The same happens on my colleagues notebook.
    If anyone has an idea why this could happen, please let me know. I am currently using Version 9.0.4.1.0.
    Thanks and br
    Daniel

    You can keep the report builder you have now. Just install the new one in new oracle home. You can download it from here
    http://www.oracle.com/technology/software/products/ids/htdocs/904winsoft.html
    This download has Developer Suite 10g (Report 9.0.4.0.33, Form 9.0.4.0.19, JDeveloper, Discoverer, Designer)
    I don't think so you can select which product you want to install, like it was in 6i. So it will install everything.
    Try to install this version. Hope this will help.
    Thanks
    FS

  • Form Layout Formula Column Bar

    Dear All,
    Need help to create a formula column in the data form. I need to sum amount from january to september in the formula column. I'm unable to figure out the syntax.
    here is the scenario,
    I have column A in which I have 3 Dimension i.e. Headcount, Year, Months. I need to sum values of months from january to september.
         Head Count                                                       
         FY13                                                       
         Jan     Feb     Mar     Apr     May     Jun     Jul     Aug     Sep     Oct     Nov     Dec
    Branch Managers     2     2     2     2     2     2     2     2     2     2     2     2
    Your help will be highly appreciated.
    Thanks

    Unless you have the periods explicitly stated in the webform design, im not sure it is possible to sum up just certain periods from one column (im assuming you have selected periods as ILvl0Descendants("Time") or similar).
    Someone else may be able to shed further light on this...but as far as im aware you can only reference columns or rows (in terms of [A] or [1]) within dataform formulas.
    JB

  • Syntax of formula column in data template

    Hi All,
    I am trying to generate XML output from Data Template. But I am struggling with how to implement formula column. I am using this syntax. But it is not working. Please anybody send me working formula column syntax.
    <element name="PO_NUMBER" value="PO_NUMBER" />
    <function name="CF_DUMMY" dataType="number" >
    <textSource>
    <! [CDATA [
    function CF_DUMMY return number is
    begin
    return 3;
    end;
    ]]>
    </textSource>
    </function>
    </group>

    The call is done directly in the query.
    In your Template header you can reference the database package to use this for example for triggers in your template:
    <dataTemplate .... defaultPackage="myPackage" ...>
    Then your Query looks like
    <sqlStatement name="Q_2">
    <![CDATA[select empno,ename,myPackage.cf_myformula(sal, comm) as Income from emp WHERE deptno=:abeilung]]>
    </sqlStatement>
    In your dataStructure Section you than can reference the formula like any other column
    <element name="INCOME" dataType="number" value="INCOME"/>
    Additionaly you can have triggers like before report trigger, where the logic is in the same database package:
    <dataTrigger name="beforeReport" source="myPackage.beforeRepLogic"/>
    Regards
    Rainer

  • Formula Columns in Data Template

    Hi,
    Is it posiible to have formula columns in data template apart from summary columns.please suggest.
    Regards

    You can put those formula-logic in sql query.
    summation/avg functions can be used directly in element.

  • How to use formula column,placeholder column in data template option

    Hi All,
    Can you some idea on these concept with example.
    Thanks in adv

    >
    formula column,placeholder column
    >
    it's oracle reports terms?
    http://oraclebizint.wordpress.com/2007/08/22/oracle-reports-to-bi-publisher-conversion-utility/
    http://eoracleapps.blogspot.ru/2009/04/how-to-convert-oracle-reports-in-bi.html
    so convert your oracle reports to bi publisher and you'll see mapping for your case

  • How to implement place holder columns in data template

    Hi,
    I have a requirement where I have to mimic the functionality of place holder columns in RDF using Data Templates in XML Publisher.
    How can I call a pl/sql function at element level when we try to group records in the data template.
    To make it simple , let us say I have a requirement to retrieve the address of an employee(address line 1,address line 2, city,country)
    In RDF what I do is define 4 place holder columns to capture address attributes, and in a formula column I set values to these attributes. How do I implement this in XML Publisher data template.
    When I tried to implement the above requirement using test variables, I was able to execute a pl/sql function after the group tag, but not within the group tag.
    I got the result for calc_values3 , but didn;t get anythng for calc_values1 and 2
    Data Template:
    <dataTemplate name="XXLCPAY142R" description="online payslip" defaultPackage="XXLCPAY_ONLINEPAYSLIP_PKG" version="1.0">
    <parameters>
    <parameter name="P_ASSIGNMENT_ACTION_ID" dataType="number" />
    </parameters>
    <dataQuery>
    <sqlStatement name="Q_PAYMENT_RUN">
    <![CDATA[
    SELECT PAAPRV.assignment_action_id assignment_action_id
    ,PAAPRV.payroll_action_id payroll_action_id
    ,PAAPRV.run_assignment_action_id run_assignment_action_id
    ,PAAPRV.run_payroll_action_id run_payroll_action_id
    ,PAAPRV.person_id person_id
    ,PAAPRV.full_name full_name
    ,PAAPRV.last_name surname
    ,PAAPRV.assignment_id assignment_id
    ,PAAPRV.business_group_id business_group_id
    ,PAAPRV.assignment_number assignment_number
    ,PAAPRV.registered_employer legal_employer
    ,PAAPRV.abn abn
    ,PAAPRV.grade grade
    ,PAAPRV.payroll_id payroll_id
    ,PAAPRV.time_period_id time_period_id
    ,PAAPRV.period_start_date period_start_date
    ,PAAPRV.period_end_date period_end_date
    ,TO_CHAR(PAAPRV.period_start_date,'DD-Mon-YYYY') period_start_display
    ,TO_CHAR(PAAPRV.period_end_date,'DD-Mon-YYYY') period_end_display
    ,PAAPRV.period_number || ' ' || TO_CHAR(PAAPRV.period_end_date,'YYYY') period_number
    ,TO_CHAR(PTP.regular_payment_date,'DD-Mon-YYYY') pay_date
    ,PAAPRV.date_earned date_earned
    ,PAAF.ass_attribute2 legacy_position
    ,HR_GENERAL.DECODE_LOOKUP('EMPLOYEE_CATG',PAAF.employee_category) paypoint
    ,PPB.name salary_basis
    ,PAAF.people_group_id people_group_id
    ,PAAF.collective_agreement_id cagr_id
    FROM pay_au_asg_payment_runs_v PAAPRV
    ,per_time_periods PTP
    ,per_all_assignments_f PAAF
    ,per_pay_bases PPB
    WHERE PAAPRV.time_period_id = PTP.time_period_id
    AND PAAPRV.assignment_id = PAAF.assignment_id
    AND PAAF.pay_basis_id = PPB.pay_basis_id
    AND PAAPRV.date_earned BETWEEN PAAF.effective_start_date AND PAAF.effective_end_date
    AND PAAPRV.assignment_action_id = :P_ASSIGNMENT_ACTION_ID
    ]]>
    </sqlStatement>
    <sqlStatement name="Q_EARNINGS_DEDUCTIONS">
    <![CDATA[
    SELECT PAI.locking_action_id assignment_action_id_elements
         ,PRR.assignment_action_id assignment_action_id_run_ele
         ,PRR.run_result_id run_result_id
         ,PPA.effective_date effective_date_run
         ,PAAF.pay_basis_id pay_basis_id
         ,PETF.element_type_id element_type_id_ele
         ,NVL(PETF.reporting_name
         ,PETF.element_name) element_name_ear_ded
         ,PIVF.input_value_id input_value_id
         ,PEC.classification_name classification_name
         ,PRRV.result_value amount_elements
         ,DECODE( PEC.classification_name
         , 'Earnings' , 1
         ,'Pre Tax Deductions' , 2
         ,'Involuntary Deductions' , 3
         ,'Voluntary Deductions' , 3 ) sort_order_elements
         ,CASE NVL(PETF.reporting_name
         ,PETF.element_name)
         WHEN 'Salary' THEN 1
         ELSE 2
         END sort_order_name
         ,DECODE( PEC.classification_name
         ,'Earnings',1
         ,0
         ) earnings_count
         ,DECODE( PEC.classification_name
         ,'Earnings',0
         ,1
         ) deductions_count     
         FROM pay_action_interlocks PAI
         ,pay_assignment_actions PAA
         ,pay_payroll_actions PPA
         ,per_all_assignments_f PAAF
         ,pay_run_results PRR
         ,pay_run_result_values PRRV
         ,pay_input_values_f PIVF
         ,pay_element_types_f PETF
         ,pay_element_classifications PEC
         WHERE PAI.locked_action_id = PAA.assignment_action_id
         AND PAA.payroll_action_id = PPA.payroll_action_id
         AND PAA.assignment_id = PAAF.assignment_id
         AND PAA.assignment_action_id = PRR.assignment_action_id
         AND PRR.run_result_id = PRRV.run_result_id
         AND PRRV.input_value_id = PIVF.input_value_id
         AND PRR.element_type_id = PETF.element_type_id
         AND PETF.classification_id = PEC.classification_id
         AND PPA.effective_date BETWEEN PAAF.effective_start_date AND PAAF.effective_end_date
         AND PPA.effective_date BETWEEN PETF.effective_start_date AND PETF.effective_end_date
         AND PPA.effective_date BETWEEN PIVF.effective_start_date AND PIVF.effective_end_date
         AND PPA.action_type IN ( 'R','Q' )
         AND PRR.status IN ('P','PA')
         AND PEC.classification_name IN ( 'Earnings'
         ,'Pre Tax Deductions'
         ,'Involuntary Deductions'
         ,'Voluntary Deductions')
         AND PIVF.name = 'Pay Value'
         AND PAI.locking_action_id = :assignment_action_id
         ORDER BY sort_order_elements ASC, sort_order_name ASC
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="beforeReport" source="XXLCPAY_ONLINEPAYSLIP_PKG.BEFORE_REPORT" />
    <dataStructure>
    <group name="G_PAYMENT_RUN" source="Q_PAYMENT_RUN">
    <element name="assignment_action_id" value="assignment_action_id"/>
    <element name="payroll_action_id" value="payroll_action_id"/>
    <element name="run_assignment_action_id" value="run_assignment_action_id"/>
    <element name="run_payroll_action_id" value="run_payroll_action_id"/>
    <element name="person_id" value="person_id"/>
    <element name="full_name" value="full_name"/>
    <element name="surname" value="surname"/>
    <element name="assignment_id" value="assignment_id"/>
    <element name="business_group_id" value="business_group_id"/>
    <element name="assignment_number" value="assignment_number"/>
    <element name="legal_employer" value="legal_employer"/>
    <element name="abn" value="abn"/>
    <element name="grade" value="grade"/>
    <element name="payroll_id" value="payroll_id"/>
    <element name="time_period_id" value="time_period_id"/>
    <element name="period_start_date" value="period_start_date"/>
    <element name="period_end_date" value="period_end_date"/>
    <element name="period_start_display" value="period_start_display"/>
    <element name="period_end_display" value="period_end_display"/>
    <element name="period_number" value="period_number"/>
    <element name="pay_date" value="pay_date"/>
    <element name="date_earned" value="date_earned"/>
    <element name="legacy_position" value="legacy_position"/>
    <element name="paypoint" value="paypoint"/>
    <element name="salary_basis" value="salary_basis"/>
    <element name="people_group_id" value="people_group_id"/>
    <element name="cagr_id" value="cagr_id"/>
    <group name="G_EARNINGS_DEDUCTIONS" source="Q_EARNINGS_DEDUCTIONS">
    <element name="assignment_action_id_elements" value="assignment_action_id_elements"/>
    <element name="assignment_action_id_run_ele" value="assignment_action_id_run_ele"/>
    <element name="run_result_id" value="run_result_id"/>
    <element name="effective_date_run" value="effective_date_run"/>
    <element name="pay_basis_id" value="pay_basis_id"/>
    <element name="element_type_id" value="element_type_id"/>
    <element name="element_name_ear_ded" value="element_name_ear_ded"/>
    <element name="input_value_id" value="input_value_id"/>
    <element name="classification_name" value="classification_name"/>
    <element name="amount_elements" value="amount_elements"/>
    <element name="sort_order_elements" value="sort_order_elements"/>
    <element name="sort_order_name " value="sort_order_name "/>
    <element name="earnings_count" value="earnings_count"/>
    <element name="deductions_count" value="deductions_count"/>
    <element name="calc_values" value="XXLCPAY_ONLINEPAYSLIP_PKG.CALC_VALUES(67772)"/>
    <element name="calc_values1" value="XXLCPAY_ONLINEPAYSLIP_PKG.RETURN_TEST"/>
    <element name="calc_values2" dataType="number" value="XXLCPAY_ONLINEPAYSLIP_PKG.P_TEST" function="XXLCPAY_ONLINEPAYSLIP_PKG.P_TEST"/>
    </group>
    </group>
    <element name="calc_values3" dataType="number" value="XXLCPAY_ONLINEPAYSLIP_PKG.P_TEST"/>
    </dataStructure>
    </dataTemplate>
    CREATE OR REPLACE PACKAGE XXLCPAY_ONLINEPAYSLIP_PKG
    AS
    P_TEST NUMBER;
    P_ASSIGNMENT_ACTION_ID NUMBER;
    FUNCTION BEFORE_REPORT RETURN BOOLEAN;
    FUNCTION RETURN_TEST RETURN NUMBER;
    FUNCTION RETURN_TEST1 RETURN NUMBER;
    FUNCTION RETURN_TEST2 RETURN NUMBER;
    FUNCTION CALC_VALUES(element_type_id number) RETURN NUMBER;
    END XXLCPAY_ONLINEPAYSLIP_PKG;
    CREATE OR REPLACE PACKAGE BODY XXLCPAY_ONLINEPAYSLIP_PKG
    AS
    P_TEST1 NUMBER;
    P_TEST2 NUMBER;
    FUNCTION BEFORE_REPORT RETURN BOOLEAN
    IS
    BEGIN
    P_TEST := 2;
    FND_FILE.PUT_LINE(FND_FILE.LOG,'From Before Report');
    RETURN(TRUE);
    END BEFORE_REPORT;
    FUNCTION RETURN_TEST RETURN NUMBER
    IS
    BEGIN
    FND_FILE.PUT_LINE(FND_FILE.LOG,'Call 1');
    RETURN(P_TEST);
    END RETURN_TEST;
    FUNCTION CALC_VALUES(element_type_id number) RETURN NUMBER
    IS
    BEGIN
    FND_FILE.PUT_LINE(FND_FILE.LOG,'Call 2');
    p_test1 := null;
    p_test2 := null;
    if ( element_type_id = 67772 ) then
    P_TEST1 := 5;
    P_TEST2 := 7;
    elsif (element_type_id = 67804 ) then
    P_TEST1 := 9;
    P_TEST2 := 11;
    end if;
    RETURN(1);
    END CALC_VALUES;
    FUNCTION RETURN_TEST1 RETURN NUMBER
    IS
    BEGIN
    RETURN(P_TEST1);
    END RETURN_TEST1;
    FUNCTION RETURN_TEST2 RETURN NUMBER
    IS
    BEGIN
    RETURN(P_TEST2);
    END RETURN_TEST2;
    END XXLCPAY_ONLINEPAYSLIP_PKG;
    /

    For this, you need to have a master query and child query.
    1) In your master query you will have to identify one unique column and call a pl/sql pkg function which calculates all values for your place holder columns and inserts rows into a pl/sql table with the index as your unique column
    ex: Master query returns
    empnum name amount
    1 scott 250
    2 bob 350
    and your calculated value is 10 percent of the amount
    your pl/sql pkg should insert records into the pl/sql table like r(1):= 250*0.1 = 25 r(2):= 350*0.1 = 35
    2) The child query will get executed for each row of you rmaster query, so you should be able to read the values based on which master records row it is executing for
    Please bear in mind that you have to make sure that the report is not executed by two different people at the same time, else you have to consider session or any other unique identifier in addition to your master records unique identifier.
    Cheers,
    Girish.

  • Blob Column in Data Template

    Below is simple Example I tried and output doesnot look right.
    Note: My Blob Database Column is "LOGO".
    Sample Data Template:
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <dataTemplate name="Employee_Listing" description="List of
    Employees">
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT EMPNO,ENAME,JOB,LOGO from
    EMP]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_EMP" source="Q1">
    <element name="EMPLOYEE_NUMBER" value="EMPNO" />
    <element name="NAME" value="ENAME"/>
    <element name="JOB" value="JOB" />
    <element name="LOGO" value="LOGO" />
    </group>
    </dataStructure>
    </dataTemplate>
    Sample Ouput Created
    <?xml version="1.0" encoding="UTF-8"?>
    <EMPLOYEE_LISTING>
    <LIST_G_EMP>
    <G_EMP>
    <EMPLOYEE_NUMBER>999</EMPLOYEE_NUMBER>
    <NAME>PILLAI</NAME>
    <JOB>MGR</JOB>
    <LOGO/>
    </G_EMP>
    </LIST_G_EMP>
    </EMPLOYEE_LISTING>
    My Question is :
    Does output should have only a TAG for Blob Column or it should have image data
    which can be rendered through Template using fo:instream tags.
    Am I hitting any bug which is preventing retrieving Blob data through XML data template

    I need to get data out of a BLOB column from a table in an Oracle 8i database and into a file that I can put into a MS Word template. The data in the BLOB column came from a MS Word document. What is the best way to proceed? We have a LOB datatype sample which shows how to save a blob from the DB to a local file at http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.htm
    I'd save it to a temp file and then using word add it. You could also spawn wscript.exe to run a Windows VB Script to automate word from the java application.
    Rob

  • Applying order by for the data comming from the formula column

    Dear Friends,
    I am having a report in which some of the columns in which data is comming from the formula columns,but i need the data in asc order.
    How can i do it.
    Please advice.

    I am having a report in which some of the columns in
    which data is coming from the formula columns,but i
    need the data in asc order.Lets say you have this query:
    select empno, sal, comm from emp
    And you have empno, sal, comm and a formula column 'f_percentage' in one group. Add one dummy column in the query, like this:
    select 'temp' temp, empno, sal, comm from emp
    Move this 'temp' column into the second group (drag and drop outside the first group). You don't have to create repeating frame/or need to show this 'temp' column on the report.
    Now if you use break order on formula column, that should work. Make sure you have break order on other columns also. Arrange items (change order) in data model as you needed. Run your report before and after this change and make sure you have same number of rows before and after this change.
    (from reports builder's help)
    "Break Order has no effect on columns that belong to the lowest group of a particular query. Break Order only affects columns in groups that are above the lowest child group of a query"

  • Suppress Missing Data not work in web form with formula column inside

    Dear All,
    I've a planning web form with formula column inside to calculate the variance and % variance. But missing cell can't be suppressed, although I've checked the 'Suppress Missing Blocks' and 'Suppress Missing Data' options.
    Anyone have face the same problem..?? and how to fixed it..??
    thanks.
    Regards,
    VieN

    There is a known issue that sounds like the problem you are experiencing
    10358200 - If a formula column exists in a data form, selecting the Suppress missing option does not hide rows that do not contain data.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Formula column help needed(urgent)

    Hi ,
    I am using the data template for generating XML data.
    BIP provided functions like SUM(), AVG(), COUNT(), MAX(), etc to use as
    below
    <group name="G_DEPT" source="Q1">
    <element name="DEPT_NUMBER" value="DEPTNO" />
    <element name="DEPTSAL" value="G_EMP.SALARY" function="SUM()"/>
    <group name="G_EMP" source="Q2">
    <element name="EMPLOYEE_NUMBER" value="EMPNO" />
    <element name="NAME" value="ENAME"/>
    <element name="JOB" value="JOB" />
    <element name="SALARY" value="SAL"/>
    </group>
    </group>
    but suppose if I want to do a sum like
    Sum(ALLdebits - All credits - All refunds).
    We use to have formula good old formula column. like in ORACLE Reports...
    below is my query in the data template....can someone please suggest?
    <dataTemplate name="R007" dataSourceRef="xyz">
         <properties>
              <property name="include_rowsettag" value="false"/>
              <property name="include_rowtag" value="false"/>
              <property name="xml_tag_case" value="as_are"/>
         </properties>
         <parameters include_in_output="false">
              <parameter name="DATE_FROM" dataType="varchar2" include_in_output="false"/>
              <parameter name="DATE_TO" dataType="varchar2" include_in_output="false"/>
              <parameter name="BANK_GIRO_NUMBER" dataType="varchar2" include_in_output="false"/>
         </parameters>
         <dataQuery>
              <sqlstatement name="Q1">
                   <![CDATA[SELECT
    DISTINCT
    SYSDATE               todayDate
    ,substr(trim(CR_BG_NO),3,8)              creditorBGNumber
    ,CREDITOR_SHORT_NAME   creditorName
    ,COUNT(*) itemCount
    FROM
    R00777_REPORT R1
    WHERE
    R1.TXN_DATE BETWEEN TO_DATE(:DATE_FROM,'YYYY-MM-DD') AND TO_DATE(:DATE_TO,'YYYY-MM-DD') AND
    R1.CR_BG_NO = :BANK_GIRO_NUMBER
    GROUP BY
    substr(trim(CR_BG_NO),3,8)        
    ,CREDITOR_SHORT_NAME]]>
              </sqlstatement>
              <sqlstatement name="Q2">
                   <![CDATA[
    SELECT
    TXN_DATE
    ,substr(trim(CR_BG_NO),3,8)
    ,PAYMENT_TYPE
    ,TXN_SERIAL_NO
    ,decode(PAYMENT_TYPE,'AGDEBIT_TRANSFER',DR_TXN_AMOUNT,'AG_REFUND',-RE_TXN_AMOUNT,'AGCREDIT_TRANSFER',-CR_TXN_AMOUNT)
    SIGN_AMOUNT
    FROM
    R00777_REPORT R2
    WHERE
    R2.TXN_DATE BETWEEN TO_DATE(:DATE_FROM,'YYYY-MM-DD') AND TO_DATE(:DATE_TO,'YYYY-MM-DD')
    AND R2.CR_BG_NO = :BANK_GIRO_NUMBER
    ]]>
              </sqlstatement>
         </dataQuery>
         <dataStructure>
              <group name="response" source="Q1">
                   <group name="head" source="Q1">
                        <element name="itemCount" value="itemCount"/>
                        <element name="todayDate" value="todayDate"/>
                        <element name="creditorBGNumber" value="creditorBGNumber"/>
                        <element name="creditorName" value="creditorName"/>
                   </group>
                   <group name="list" source="Q2">
                        <group name="listItem" source="Q2">
                             <element name="transactionDate" value="TXN_DATE"/>
                             <group name="transactions" source="Q2">
                                  <group name="transaction" source="Q2">
                                       <element name="transactionType" value="PAYMENT_TYPE"/>
                                       <element name="serialNumber" value="TXN_SERIAL_NO"/>
                                       <element name="amount" value="SIGN_AMOUNT"/>
                                  </group>
                             </group>
                             <element name="netSum" value="transaction.SIGN_AMOUNT" function="SUM()"/>
                        </group>
                   </group>
              </group>
         </dataStructure>
    </dataTemplate>

    Hi Rainer,
    Many Thanks for your reply
    I had done all the calculations in the report view earlier
    and when i accessed it in the data template as follows
    <element name="netSum" value="netSum" />
    the xml output that i got was like
    <R007>
    <response>
    <head>
    <itemCount>8</itemCount>
    <todayDate>2009-02-05T15:50:12.000+01:00</todayDate>
    <creditorBGNumber>01829209</creditorBGNumber>
    <creditorName>ANDROMEDA</creditorName>
    </head>
    <list>
    <listItem>
    <transactionDate>2008-09-03T00:00:00.000+02:00</transactionDate>
    <netSum>-6647999</netSum>
    <transactions>
    <transaction>
    <transactionType>AGCREDIT_TRANSFER</transactionType>
    <serialNumber>5</serialNumber>
    <amount>-1687200</amount>
    </transaction>
    </transactions>
    </listItem>
    </list>
    </response>
    </R007>
    But the output that i want is something like this
    <R007>
    <response>
    <head>
    <itemCount>8</itemCount>
    <todayDate>2009-02-05T15:50:12.000+01:00</todayDate>
    <creditorBGNumber>01829209</creditorBGNumber>
    <creditorName>ANDROMEDA</creditorName>
    </head>
    <list>
    <listItem>
    <transactionDate>2008-09-03T00:00:00.000+02:00</transactionDate>
    <transactions>
    <transaction>
    <transactionType>AGCREDIT_TRANSFER</transactionType>
    <serialNumber>5</serialNumber>
    <amount>-1687200</amount>
    </transaction>
    </transactions>
    <netSum>-6647999</netSum>
    </listItem>
    </list>
    </response>
    </R007>
    Hence I used the BIP built in template function like this
    <element name="netSum" value="transaction.SIGN_AMOUNT" function="SUM()"/>
    but the sum() function is adding up all amounts as expexted,I want
    the above newsum value as
    Sum(AGdebit-AGCREDIT-AG_refund).

  • Formula column in BI

    Hi all and Raineer
    i have written a formula column in the below Data template and it is not giving any result for the id element when i view the xml output
    <dataTemplate name="data_template" description="Template_description" dataSourceRef="TFUAT">
         <parameters>
              <parameter name="org_id" dataType="number" defaultValue="121"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="Q1">
                   <![CDATA[SELECT party_name FROM
    apps.hz_parties where rownum<10
    ]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="G_temp" source="Q1">
                   <element name="ite_use_id" value="party_name"/>
                   <element name="id" dataType="character" value="FormulaProfitMargin"/>
              </group>
         </dataStructure>
         <programUnits>
              <function name="FormulaProfitMargin">
                   <![CDATA[
          FUNCTION FormulaProfitMargin RETURN number IS
          BEGIN
            return (10);
          END;
        ]]>
              </function>
         </programUnits>
    </dataTemplate>
    thank you
    Boo

    If I use the suggested way in SQL query, I will have performace issue. My query selects 20 columns 4 among them are with aggregate functions. It is forcing me to do the group by with remaining 16 columns.
    Please provide me the sample code which has alternate way to extract formula.
    Thanks in advance.
    Regards
    Boopathi

Maybe you are looking for

  • SOAP to RFC : Message visible in Message Monitoring , but not in SXMB_MONI

    Hi Experts, I'm doing a SOAP to BAPI scenario. The interface is a SYNCHRONOUS one . I'm using XML SPY as the soap client to test the interface. Even though i don't have the test for the BAPI after sending an empty request message i'm able to receive

  • Price including Tax

    Hi all friend and Laxmi I have a problem that how to calculate that where a price in including the tex amount e.g Amount 100 (including tax) Tax        4% then how to calculate Net value (Amount- Taxes) Hope you all understand is there any alt cal ty

  • Vertically-aligned tables shift down when entering/editing text within the table.

    Hi all, We have a sudden problem that is occurring, and I've done a lot of searching without finding anything close to this happening elsewhere. If there is ever a table that is aligned vertically within a text frame, you cannot edit the text without

  • How to include trash as favorite in finder window

    Is there an easy way to include "trash" as one of the favorites in a finder window? (If the answer includes using Terminal, then to me that="no")

  • Does a Signature Field Have a Signature?

    I have a form with 2 signature fields.  I want to make sure that the first Signature Field has a signature in it before the second can be entered.  I think I would use a script in the Pre-Sign event, but I don't know what property to check, or what e