Passing menu selections as parameters to Data Template

Hi,
Following is my data template where i am passing 3 parameters - product_names(drop down menu, with option of multiple select with All), balance_date and trailing_days:
<dataTemplate name="ProductTrendDataTemplate" description="Product Trend Report" dataSourceRef="PI reporting DS">
     <properties>
          <property name="include_parameters" value="false"/>
          <property name="include_null_Element" value="false"/>
          <property name="include_rowsettag" value="false"/>
          <property name="scalable_mode" value="off"/>
     </properties>
     <parameters>
          <parameter name="product_names"/>
          <parameter name="balance_date" dataType="date"/>
          <parameter name="trailing_days" dataType="number" defaultValue="30"/>
     </parameters>
     <dataQuery>
          <sqlStatement name="settlementlvl">
               <![CDATA[     
          select
            to_char(eff_d , 'MM/DD/YYYY') as settlement_date,
            prdt_nm as product_name,
            sum(tt_now_mmda_bal_a) as balance,
            sum(acc_cnt) as account_count,
            to_char(latest_settlement_date, 'MM/DD/YYYY') as latest_run_date
           from
            <tables>
           where
            prdt_nm in (:product_names)
            and eff_d <= nvl(cast(:balance_date as date), (select max(eff_d) from t_frdba_daily_bal_f))
            and eff_d >= nvl(cast(:balance_date as date), (select max(eff_d) from t_frdba_daily_bal_f)) - :trailing_days       
            group by eff_d, prdt_nm, latest_settlement_date
            order by eff_d, prdt_nm
               ]]>
          </sqlStatement>
     </dataQuery>
     <dataStructure>
          <group name="SETTLE_INFO" source="settlementlvl">
               <element name="SETTLE_DATE" value="settlement_date"/>
               <element name="PRODUCT_NAME" value="product_name"/>
               <element name="BAL" value="balance"/>
               <element name="ACCNTS" value="account_count"/>
               <element name="LATEST_SETTLEMENT_DATE" value="latest_run_date"/>
          </group>
     </dataStructure>
</dataTemplate>
The parameter definition in the xdo document is as follows:
<parameters>
<parameter id="balance_date" dataType="xsd:date">
<date label="Latest Settlement Date" format="dd-MMM-yy"/>
</parameter>
<parameter id="trailing_days" defaultValue="90" dataType="xsd:integer">
<input label="Trailing Days" size="4"/>
</parameter>
<parameter id="product_names" defaultValue="*">
<select label="Products" valueSet="product_list" multiple="true" all="true" allValue="lov"/>
</parameter>
</parameters>
My problem pertains to the parameter product_names. When I select either All or multiple product_names (that is when I select product X,Y and Z from the front end), the product names are passed in as a single string into the query. As a result of this the query prdt_nm in (:product_names) fails as it trys to find all the product_names with value "'X','Y','Z'" instead of selecting on values 'X', 'Y', 'Z' separately. Thus the query is failing for multiple select. Can anyone suggest as how to handle this condition?
Please let me know if you need more information on this....
Thanks,
Ashwin

Tim,
The output from my OC4J terminal with debugger turned on is
The sql query at run time looked as: prdt_nm in (:product_names)
Parameter value substituted as:
[101609_022156559][][STATEMENT] 1: product_names:'X','Y','Z'.
So I assume that the data template recvd this parameter as an string " 'X','Y','Z' ".
Just out of curiosity, I tried the same without using data template , just using plain SQL query, the output from the OC4J terminal is as follows:
In the query the parameter product_names is replace as prdt_nm in (:product_names2905,:product_names2906,:product_names2907) and the values are substituted as
[101609_022637635][][STATEMENT] 1:X
[101609_022637635][][STATEMENT] 2:Y
[101609_022637635][][STATEMENT] 3:Z
So from this you can see that BI publisher is some how handling the data template's parameter parsing differently from plain sql query.
Tim, I am not familiar with pre-fetch triggers as I am new to PL/Sql. Is there someway to handle this at the query level instead of writing a PL/SQL function.
Appreciate your help.
Ashwin

Similar Messages

  • Problem with parameters in Data Template

    Hello,
    I created some reports using the data template and didn't have any problems. I wanted to change the name of a couple of my parameters and now I can't get any data returned in my reports. If I remove the parameters data is returned or if I rename the parameters to something else data is returned. It seems like it has something to do with these two names of the parameters that I'm using that is causing the report not to run, but I have no idea why or where to even look.
    Here is my example report:
    With parameter names P_JUR and P_TAXYR my report runs without any problems.
    <dataTemplate name="test" description="test Report">
         <parameters>
              <parameter name="P_JUR" dataType="character"/>
              <parameter name="P_TAXYR" dataType="number"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="RP"><![CDATA[select p.jur, p.parid, p.taxyr,
           p.luc, p.nbhd, o.own1, p.adrno,
           p.adrdir||decode(p.adrdir,'','',' ')||p.adrstr||decode(p.adrsuf,'','',' ')||p.adrsuf addr
            from pardat p, owndat o
    where p.jur = o.jur
       and p.parid = o.parid
       and p.taxyr = o.taxyr
       and p.cur = o.cur
         and p.cur = 'Y'
       and p.jur = :p_jur
       and p.taxyr = :p_taxyr
    and rownum < 10]]></sqlStatement>
         </dataQuery>
         <dataTrigger name="beforeReport" source="bipub.SETUSERIDSESSION(:P_USERNAME)"/>
         <dataStructure>
              <group name="RP" source="RP">
                   <element name="JUR" value="JUR"/>
                   <element name="PARID" value="PARID"/>
                   <element name="TAXYR" value="TAXYR"/>
                   <element name="CMAP" value="CMAP"/>
                   <element name="LUC" value="LUC"/>
                   <element name="OWN1" value="OWN1"/>
                   <element name="NBHD" value="NBHD"/>
                   <element name="ADRNO" value="ADRNO"/>
                   <element name="ADDR" value="ADDR"/>
              </group>
         </dataStructure>
    </dataTemplate>
    As soon as I change my parameters and remove the "P_" - changed to JUR and TAXYR my report no longer returns data:
    <dataTemplate name="test" description="test Report">
         <parameters>
              <parameter name="JUR" dataType="character"/>
              <parameter name="TAXYR" dataType="number"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="RP"><![CDATA[select p.jur, p.parid, p.taxyr,
           p.luc, p.nbhd, o.own1, p.adrno,
           p.adrdir||decode(p.adrdir,'','',' ')||p.adrstr||decode(p.adrsuf,'','',' ')||p.adrsuf addr
            from pardat p, owndat o
    where p.jur = o.jur
       and p.parid = o.parid
       and p.taxyr = o.taxyr
       and p.cur = o.cur
         and p.cur = 'Y'
       and p.jur = :jur
       and p.taxyr = :taxyr
    and rownum < 10]]></sqlStatement>
         </dataQuery>
         <dataTrigger name="beforeReport" source="bipub.SETUSERIDSESSION(:P_USERNAME)"/>
         <dataStructure>
              <group name="RP" source="RP">
                   <element name="JUR" value="JUR"/>
                   <element name="PARID" value="PARID"/>
                   <element name="TAXYR" value="TAXYR"/>
                   <element name="CMAP" value="CMAP"/>
                   <element name="LUC" value="LUC"/>
                   <element name="OWN1" value="OWN1"/>
                   <element name="NBHD" value="NBHD"/>
                   <element name="ADRNO" value="ADRNO"/>
                   <element name="ADDR" value="ADDR"/>
              </group>
         </dataStructure>
    </dataTemplate>
    I know it's getting my values because when I run the report I get this output:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <TEST>
    <JUR>040</JUR>
    <TAXYR>2008.0</TAXYR>
    <LIST_RP />
    </TEST>
    I can change the parameter names to BOB, TOM, A, B, C, etc. and the report runs fine. It's just those two parameters JUR and TAXYR that do not work. I'm integrating this with another system which is why it's important is uses JUR and TAXYR. Anyone have any idea where to check or what I can check to see why it wouldn't work with only those two parameter names?
    Thanks

    Always keep the parameter name with some standard :) to avoid these kind of issues.
    keep PARAM_XYZ
    like PARAM_TZXYR , PARAM_JUR

  • Date Parameters in Data Templates..

    Mornin all..
    How are you using date parameters in your Data templates..?
    I'm trying to run a Conc Program that has a date parameter. in ORACLE Con Program the value set is setup to retrieve the format dd-MON-yyyy.
    I also have this format specified in the Data Template..
    <parameter name="p_paydate_from" dataType="character" />
    <parameter name="p_paydate_to" dataType="character" /> ..and then again in the SELECT statement..
    <![CDATA[
    SELECT DISTINCT.......
    TO_CHAR(ip.creation_date, 'dd-MON-yyyy') Paid_Date, sfc.faculty_code Faculty, etc..
    FROM
    WHERE
    AND TRUNC(ip.creation_date) BETWEEN NVL(:p_paydate_from, '01-JAN-1999') AND NVL(:p_paydate_to, '31-DEC-2299')...
    ]]>..yet when I run the report it just ignores the data parameter and returns all records..
    I know that if that this was done in ORACLE Reports I'd have to place this in AfterPFormTrigger..
    IF :p_paydate_from is not null then
    :lp_paydate_from := 'and ip.accounting_date >= to_date(:p_paydate_from, ''YYYY/MM/DD HH24:MI:SS'')' ;
      ELSE      :lp_paydate_from := '';
      END IF;
        IF :p_paydate_to is not null then
              :lp_paydate_to := 'and ip.accounting_date <= to_date(:p_paydate_to, ''YYYY/MM/DD HH24:MI:SS'')' ;
      ELSE       :lp_paydate_to := '';
      END IF; Question is - do I have to create a trigger and put it into my data template or am I working the date parameter wrongly..? How do you use date parameters in your Data templates..?
    Many thanks for Looking..
    Steven
    Edited by: JackyWhite on May 14, 2010 12:20 PM

    Thanks for the comments.
    I am able to return records when using the code in the SELECT statement via TOAD.
    I've tried specifying dates in the parameter section but it was just the same error.
    The error message given when I include these date parameters when in run the Conc Program is..
    [051410_022803764][][STATEMENT] 8: p_paydate_from:2010/01/01 00:00:00
    [051410_022803764][][STATEMENT] 9: p_paydate_to:2010/01/21 00:00:00
    --SQLException
    java.sql.SQLException: ORA-01861: literal does not match format string
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)I know what the problem is, I just done know how to fix it. I'll try to explain. In ORACLE reports
    In the Conc Program (running the report) The date can be entered in the format 'DD-MON-YYYY'
    In the Report Oracle sends this date to the report in the format 'YYYY/MM/DD HH24:MI:SS'. To accept this date in the report the easiest method is to.....
    1. Create the date parameter as a varchar(20) instead of a date type
    2. In the After Parameter Trigger convert the date either into a local variable or into a lexical variable (used in the SQL query) by using the code
             to_date(:p_date_parameter_name, '''YYYY/MM/DD HH24:MI:SS'')
         srw.message(10, 'P Date from ' ||:p_date_from);
          if :p_paydate_from is not null then
              :Lp_paydate_from := 'and trunc(...............) >= to_date(:p_paydate_from,''YYYY/MM/DD HH24:MI:SS'')';
           :disp_date_from := to_char(to_date(:p_paydate_from,'YYYY/MM/DD HH24:MI:SS'),'DD-MON-YYYY');
              srw.message(10, 'LP Date from ' ||:lp_paydate_from);
          end if; etc etc etc..      end if;I know that if I can convert it somewhere somehow using that 'to_date(:p_paydate_from,...' thing then I reckon it should work..
    I'm currently trying to figure out (a tad rusty at PLSQL now) how can I create an afterpform trigger to be called in the data template that does the above (basically just to convert the date format)..
    PLease tell me there is an easier way!
    Thanks!
    Steven

  • Parameters in Data Templates

    Hey gurus!
    I am using 10.1.3.3.3 and am having a problem with parameters. If I just use a sql query for my data model and create a parameter, it works fine. I am having a problem when I use a data template in my data model and try and use a parameter.
    The beginning of my data template is this:
    <dataTemplate dataSourceRef="oltpdev" name="mdd_rmv_stuff" defaultPackage="mdd_rmv_stuff">
    <properties>
    <property name="xml_tag_case" value="upper"/>
    </properties>
    <parameters>
    <parameter name="p_manager_product_id" dataType="integer"/>
    </parameters>
    <lexicals>
    </lexicals>
    <dataQuery>
    <sqlStatement name="Q_MAIN">
    select mp.manager_product_id mp_id,
    mp.manager_product_name,
    mp.manager_roof_id
    from manager_product mp
    where mp.manager_product_id=:p_manager_product_id
    </sqlStatement>
    You can see where I am trying to use the parameter. I get this error when I try to view the report:
    ====================================================================
    Error
    The report cannot be rendered because of an error, please contact the administrator.
    Error Detail
    ORA-06550: line 2, column 1:
    PLS-00201: identifier 'MDD_RMV_STUFF.P_MANAGER_PRODUCT_ID' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    ====================================================================
    Any help would be appreciated!!!
    Kris Henning
    www.piocon.com

    If you don't own any data triggers and you don't need to push parameters to PL/SQL then don't define defaultPackage attribute, parameters will bind to the Queries and we will not push to PL/SQL
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    *<dataTemplate name="dataTemplateName" description="Template description" version="1.0">*
    <parameters>
    <parameter name="p_DEPTNO" dataType="Number" defaultValue="20"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT DEPTNO DEPTNO1,DNAME,LOC from dept
                         order by deptno]]>
    </sqlStatement>
    <sqlStatement name="Q2">
    <![CDATA[SELECT  EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,nvl(COMM,0) COMM
                         from EMP
                         WHERE DEPTNO = :DEPTNO1 ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_DEPT" source="Q1">
    <element name="DEPT_NUMBER" value="DEPTNO1" />
    <element name="DEPT_NAME" value="DNAME"/>
    <element name="DEPTSAL" value="G_EMP.SALARY" function="SUM()"/>
    <element name="LOCATION" value="LOC" />
    <group name="G_EMP" source="Q2">
    <element name="EMPLOYEE_NUMBER" value="EMPNO" />
    <element name="NAME" value="ENAME"/>
    <element name="JOB" value="JOB" />
    <element name="MANAGER" value="MGR"/>
    <element name= "HIREDATE" value="HIREDATE"/>
    <element name="SALARY" value="SAL"/>
    </group>     
    </group>
    </dataStructure>
    </dataTemplate>

  • Parameter Passing from Concurrent Program to XML Data Template

    Hi All,
    I have a xml data template which is attached to a data definition. The data template contains a SQL query and some parameter definitions. One of the parameters is p_emp_id. The data type of the parameter is "number" and the where clause that uses the parameter is as follows:
    AND employee_id in (:p_emp_id,DECODE(:p_emp_id,126,130,-99).
    The data definition is attached to a concurrent program which has a parameter based on a valueset. Format type of valueset is char. Validation type is table. Inside the table definition, the table is employees. value column is emp_name type is char. meaning column is emp_name type is char. ID column is emp_id type is number.
    The above where clause condition fails when the conc program is run. In the log file I can see that the value passed is 126 from the valueset. If the query is run independently in TOAD and value passed is 126, the where clause returns rows.
    Kindly let me know what could be the possible issue. Let me know if the question is not clear enough.
    Thanks,
    Amit

    Hi Ashish,
    Thanks for replying.
    I mentioned that the Id column of the VSet is emp_id right ? Isn't the Id column value passed ?
    Moreover I also mentioned that I could see in the log file that the emp_id value is being passed and not the name. I could see in the log file p_emp_id=126. There seems to be some problem with the data types and all.
    Thanks,
    Amit

  • Problem in calling FBL3N and passing Dynamic Selection Screen Parameters

    Hi Experts,
    I am calling the standard report FBL3N in one of my reports using Submit.
    I am passing the GLcode, Company code and Open at key Date in the selection screen.
    Now my requirement is that I need to pass the Posting Key as '40' in my report.
    40 signifies a Debit Entry.
    Now the Posting key comes as a Dynamic Selection parameter in the FBL3n program.
    I am unable to determine the name of the field to which I should pass the value 40.
    Please advice.
    Regards

    Hi,
    Each GL Account belongs to Field status group--> table SKB1.
    Each Field Status group will have specific field combinations --> We can get this using the tables TMODO and TMODP.
    Pls design ur BDC depending on the values from these table.
    (Note: I have done same like this for populating values to dynamic fields ).
    Let me know if u need any information.
    Thanks,
    Senthil

  • Passing select-options parameters type to the class

    Hi All,
    I am creating one class and I want to pass the select-options parameters directly to it like s_plant,s_mtart etc .
    So while specifying these as paramters what type I should give them?
    Rgds,
    Madhuri

    Whatever you finally decide upon, you must have a Data Dictionary definition. So either create one for each type (bukrs, vkorg, etc.) or use a general one like RSELOPTION. However with the general one you have to put extra code in the class to convert back from a CHAR 45 field to your special field.
    Anyway, using the Data Dictionary is fun! So go create as many new tables as you need. In the long term, the work you do in the Data Dictionary is never wasted and it may save you time in the future when you need that structure / table again for a different program.
    Creating these structures and tables is easy if you use shortcuts. For example in local definitions in your program you can code...
    data range1 type range of bukrs.
    or
    data wa_bukrs type bukrs.
    ranges range1 for wa_bukrs.
    either of these gives you the structure... no need to manually type sign, option, low, high...
    What about Global (data dictionary) definitions? yes, there are also shortcuts...
    start transaction SE11, enter range table name in the 'Data' field (e.g. ZMYRANGETAB), Hit Create, choose to create a Table Type... now you are on the blank new Maintain Table Type screen. enter a short text for your new table, then choose
    Edit->Define as ranges table type
    next enter your data element (e.g. BUKRS) under 'data element', hit Save and activate. You just created your range table without manually entering sign, option, low, high...
    But wait there's more... on the same screen you can now (after saving the range table) also enter a structure name such as ZMYRANGE in the field 'structured row type'. Hit Create and you are taken to the Maintain Structure screen where the sign, option, low and high are already populated... add a short description and save and activate... you just created a workarea for your range table.
    You just created a table type ZMYRANGETAB and a structure ZMYRANGE with minimal effort.

  • How to use Report Parameter  on Data Template

    Hello All ,
    I 've tried to create a Report using Data template and Report Parameter. I create a report using data template and I also created a parameter (P_company_name).
    Data Template :
    <dataTemplate name="test_Data_template" description="test" dataSourceRef="test">
    <parameters>
    <parameter name="company_name" dataType="character" include_in_output="false" defaultValue= *** HOW TO DEFINE THE REPORT PARAMETER (P_Company_name) HERE ** />
    </parameters>
    <dataQuery><sqlStatement name="Q1"> <![CDATA[SELECT customer_no,Company_name, from customers where acquisition_id = :company_name  ]]>
    </sqlStatement>
    Report Parameter
    Identifier : P_Company_name
    Data Type : String
    Default Value : Test
    Parameter Type : Text
    When the endusers run the Report they will provide the Company name through the report parameter.
    I have tried to use the same approach that I used to pass the Parameter to SqlQuery on data Template but it is not working . XML Publisher cannot define the parameter.
    How can I do that ?
    If you have any suggestion or document I will really appreciate.
    Thanks,
    Robson

    use this <parameter name="P_Company_name" dataType="character" include_in_output="false" defaultValue= 'Test Value' />and in the querySELECT customer_no,Company_name, from customers where acquisition_id = :P_Company_namehttp://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12187/T421739T434255.htm
    Just keep the parameter name in datatemplate and the definition same.

  • How to retrieve data from plsql table in BI publisher Data template

    Hi All,
    I have created a data template for XML publisher report. In data template i m getting data from plsql table. for that i have created one package with pipelined function. I am able to run that sql from sql developer .But if i run the concurrent program then i got error like "java.sql.SQLSyntaxErrorException: ORA-00904: "XXXXX": invalid identifier".
    I have used the same parameters in Data template and concurrent program....
    please clarify me what needs to be done....
    thanks in advance....
    Regards,
    Doss

    Hi Alex ,
    i am using pipelined function and get the data from cursor and load it into plsql table (nested table). and i use the below in my data template to fetch the data:
    <sqlStatement name="Q1">
    <![CDATA[select * from  table(PO_SPEND_RPT_PKG.generate_report(P_ORG_ID,P_SOB_ID,P_ORG_NAME,P_PERIOD_NAME,P_CLOSE_STATUS,P_E_PCARD_NEED,P_REPORT_TYPE))]]>
    </sqlStatement>
    if i run the above in sql developer i can get the result....from apps if i run i got the error "java.sql.SQLSyntaxErrorException: ORA-00904: "P_ORG_ID": invalid identifier"
    Edited by: kalidoss on Sep 14, 2012 4:32 AM

  • DefaultValue in BIP data template's parameter is not working

    Hi,
    I have given the below in BIP data template and submit the concurrent program(in R12 ) without parameter. But the below given default value has not been taken by the program.
    <parameter name="P1" dataType="character" defaultValue="abc"/>
    How to pass the default value in BIP data template.
    Regards,
    P.Kalidoss

    Hi,
    The data type is optional... so perhaps try
    <parameter name="P1" defaultValue="abc"/>
    Alternatively, 'parameters data types' can only be String, Integer, Boolean, Date or Float so perhaps try something like this...
    <parameter name="P1" dataType="String" defaultValue="abc"/>
    Hope this helps
    Regards,
    Daniel

  • How to pass the parameter in "Data Template"

    Hi,
    Can any one please help me out to sort the problem, "Passing Parameter and checking condition for the parameters in the "data template".
    And also please tell me how to link the multiple query in "Data template", as per the user guide i have it says to use link tag. But its not working with my "Data template".
    Please check the data template given below and help me out to sort the problem.
    And one more thing is in table the data type for number and name is varchar. I dono weather i can use that data type in "Data template", please let me know if i can.
    <?xml version="1.0"?>
    <dataTemplate name="VENODR_DETAILS">
    <parameters>
    <parameter name="VENDOR_NUM" dataType="number"/>
    <parameter name="VENDOR_NAME" dataType="char"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT pv.segment1 ven_num,
              pv.vendor_name vname,
                          pvs.vendor_site_code VEN_SIT_CODE,
              pvs.purchasing_site_flag PURCH_SIT_FLG,
              pvs.pay_site_flag PAY_SIT_FLG,
              pv.vendor_name VENDOR_ADDR_NAME,
              pvs.address_line1 VENDOR_ADDR1,
              pvs.address_line2 VENDOR_ADDR2,
              pvs.city VENDOR_CITY,
              pvs.state VENDOR_STATE,
              pvs.zip VENDOR_ZIP
    FROM vendors pv,supplier_info pvi,vendor_sites_all pvs
    where pv.segment1 = pvi.vendor_id(+)
    and pv.vendor_id = pvs.vendor_id
    and (pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    ]]>
    </sqlStatement>
    <sqlStatement name="Q2">
    <![CDATA[select pvc.area_code||'-'||pvc.phone Contact_Phone,
    pvc.last_name||' '||pvc.first_name||' '||pvc.middle_name cname
    from vendor_contacts pvc,vendor_sites_all pvs,vendors pv
    where pvs.vendor_site_id = pvc.vendor_site_id
    and pv.vendor_id = pvs.vendor_id
    and pv.segment1=(pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="VENDOR" source="Q1">
    <element name="VENDOR_NUMBER" value="ven_num"/>
    <element name="VENDOR_NAME" value="vname"/>
    <element name="CATEGORY" value="VENDOR_CAT"/>
    <element name="UPDATE_DATE" value="UPDATE_DT"/>
         <group name="VENDOR_SITE" source="Q1">
         <element name="VEN_SIT_CODE" value="VEN_SIT_CODE"/>
         <element name="PURCH_SIT_FLG" value="PURCH_SIT_FLG"/>
         <element name="PAY_SIT_FLG" value="PAY_SIT_FLG"/>
         <element name="VENDOR_ADDR1" value="VENDOR_ADDR1"/>
         <element name="VENDOR_ADDR2" value="VENDOR_ADDR2"/>
         <element name="VENDOR_CITY" value="VENDOR_CITY"/>
         <element name="VENDOR_STATE" value="VENDOR_STATE"/>
         <element name="VENDOR_ZIP" value="VENDOR_ZIP"/>
         </group>
    </group>
    <group name="VENDOR_CONTACT" source="Q2">
    <element name="Contact_Phone" value="Contact_Phone"/>
    <element name="cname" value="cname"/>
    </group>
    </dataStructure>
    </dataTemplate>
    Thanks in advance.
    Regards,
    SP

    Hi Rani,
    I see one issue in the Q2 with the where statement:
    and pv.segment1=(pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    the right one should be
    and pv.vendor_id = :VEN_VENDOR_ID
    the variable VEN_VENDOR_ID you have to select from the first query Q1. Add here after select
    pv.vendor_id VEN_VENDOR_ID,
    Regarding the other question about the data types, well, number and varchar2 is fine, perhaps char also, but go with varchar2 instead.
    One last note: you should not mix uppercase and lowercase, keep it clear and structured, check your element names and values.
    Best Regards
    Volker

  • BeforeReportTrigger , Data Template and Parameters

    Hi
    I'm new to XML publisher. Things has been going quite smoothly until I started to introduce BeforeReportTriggers and Parameters in my Data Template.
    When I go to view the report, I get
    "The report cannot be rendered because of an error, please contact the administrator"
    Unfortunately, I don't know if there is any log file for further information. I know the package works when I was debugging it.
    Please help.
    Below is my XML Data Template, the package header and body
    XML data template
    <dataTemplate name="SCH_A_dt1" description="schedule A database template1" defaultPackage="sch_a_dt1" dataSourceRef="nbdot_zsvm1">
    <parameters>
    <parameter name="p_COUNTY" dataType="character" defaultValue="GLOUCESTER"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <!-- insert sql statement here-->
    <![CDATA[select COUNTY, NETWORK_COMP,SECT_ID,CS_REF,RD_LOC,TYPE_MEANING,TOTAL_KM from sch_A_byCounty_det
    where &P_WHERE_CLAUSE]]>
    </sqlStatement>
    </dataQuery>
    <!-- BEFOREREPORT TRIGGER -->
    <dataTrigger name="beforeReportTrigger" source="sch_a_dt1.BEFOREREPORTTRIGGER(p_COUNTY)"/>
    <!-- DataStructure -->
    <dataStructure>
    <group name="G_COUNTY" source="Q1">
    <element name="COUNTY_NAME" value="COUNTY"/>
    <group name="G_NETWORK" source="Q1">
    <element name="NETWORK" value="NETWORK_COMP"/>
    <element name="SECT_ID" value="SECT_ID"/>
    <element name="ROAD_LOCATION" value="RD_LOC"/>
    <element name="TYPE_MEANING" value="TYPE_MEANING"/>
    <element name="LENGTH" value="TOTAL_KM"/>
    </group>
    </group>
    </dataStructure>
    </dataTemplate>
    Package header
    create or replace package sch_a_dt1
    as
    p_county varchar2(50);
    P_WHERE_CLAUSE VARCHAR2(100);
    procedure beforereportTrigger(p_county varchar2);
    end;
    Package body
    CREATE or replace PACKAGE BODY sch_a_dt1
    as
    procedure beforereportTrigger (p_county varchar2) is
    begin
    if (p_county) is null then
    p_where_clause := '1=1';
    elsif (p_county = '*') then
    p_where_clause := '1=1';
    else
    p_where_clause := 'COUNTY in (' ||p_county||')';
    end if;
    end;
    end;
    Thanks Zubran

    Thanks Daniel..
    You were right! The weird thing is that the XML user guide used a procedure as an example.
    Anyway. I wonder if you assist me further. Although I don't get an error, when I try to query on a paramter, I get no data return {ie. only the parameter is shown in result}. However, when I pass in '*' or null as per my function then this return the entire database.
    Please can you have a quick at the function and xml data template again.
    XML Data Template
    <dataTemplate name="SCH_A_dt1" description="schedule A database template1" defaultPackage="sch_a_dt1" dataSourceRef="nbdot_zsvm1">
    <parameters>
    <parameter name="p_COUNTY" dataType="character" defaultValue="GLOUCESTER"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <!-- insert sql statement here-->
    <![CDATA[select COUNTY, NETWORK_COMP,SECT_ID,CS_REF,RD_LOC,TYPE_MEANING,TOTAL_KM from sch_A_byCounty_det
    where &amp;P_WHERE_CLAUSE]]>
    </sqlStatement>
    </dataQuery>
    <!-- BEFOREREPORT TRIGGER -->
    <dataTrigger name="beforeReportTrigger" source="sch_a_dt1.beforerep(:p_COUNTY)"/>
    <!-- DataStructure -->
    <dataStructure>
    <group name="G_COUNTY" source="Q1">
    <element name="COUNTY_NAME" value="COUNTY"/>
    <group name="G_NETWORK" source="Q1">
    <element name="NETWORK" value="NETWORK_COMP"/>
    <element name="SECT_ID" value="SECT_ID"/>
    <element name="ROAD_LOCATION" value="RD_LOC"/>
    <element name="TYPE_MEANING" value="TYPE_MEANING"/>
    <element name="LENGTH" value="TOTAL_KM"/>
    </group>
    </group>
    </dataStructure>
    </dataTemplate>
    Procedure body
    CREATE or replace PACKAGE BODY sch_a_dt1
    as
    function beforerep (p_county in varchar2) return boolean is
    begin
    if (p_county) is null then
    p_where_clause := '1=1';
    return true;
    elsif (p_county = '*') then
    p_where_clause := '1=1';
    return true;
    else
    p_where_clause := 'COUNTY in (' ||p_county||')';
    return true;
    end if;
    exception
    when others then
    return false;
    end ;
    end ;
    Header
    create or replace package sch_a_dt1
    as
    p_county varchar2(50);
    P_WHERE_CLAUSE VARCHAR2(100);
    function beforerep (p_county in varchar2) return boolean;
    end;
    /

  • Passing parameters to data trigger

    I've seen many posts regarding this, but the parameters seems to be coming from user-supplied values. Is there a way to pass an element from the data template as the parameter. I want the the data trigger to be fired for each unique value of a certain data element retrieved from the query.

    Thanks, Ike, I have used bind variables in the past, but have never tried to pass one into the data trigger. Using your advice I attempted this, but it only passed in the value of the last row to the function.
    <dataQuery>
              <sqlStatement name="Q1">
                   <![CDATA[ select HEADERS.LOG_ID as LOG_ID,
          HEADERS.OPENED_BY_NAME as OPENED_BY_NAME,
          HEADERS.ISSUE_OPEN_DATE as ISSUE_OPEN_DATE,
          HEADERS.ISSUE_DESCRIPTION as ISSUE_DESCRIPTION,
          HEADERS.CREATED_BY as CREATED_BY,
         from      HEADERS      ]]>
              </sqlStatement>
              <sqlStatement name="Q2">
                   <![CDATA[select       LINES.STATUS as STATUS,
          LINES.ASSIGNED_TO as ASSIGNED_TO,
          LINES.COMMENTS as COMMENTS
          from     LINES
         where      (LINES.LOG_ID = :LOG_ID)
         and     UPPER(JCIFND_ISSUES_LINES.status) = 'OPEN']]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="HEADER" source="Q1" groupFilter="">
                   <element name="LOG_ID" value="LOG_ID" function=""/>
                   <element name="OPENED_BY_NAME" value="OPENED_BY_NAME" function=""/>
                   <group name="LINE" source="Q2" groupFilter="">ction=""/>
                        <element name="RESOLUTION_VALUE" value="RESOLUTION_VALUE" function=""/>
                        <element name="RESOLUTION_DESCR" value="RESOLUTION_DESCR" function=""/>
                        <element name="COMMENTS" value="COMMENTS" function=""/>
                   </group>
              </group>
         </dataStructure>
         <dataTrigger name="afterReport" source="MY_PKG.MY_ISSSUES(:LOG_ID)"/>
    Valid log id values in my test data are 1001 and 1002, but the function only is called with value 1002.
    Any ideas on how to call this function for each value?
    Thanks and Happy New Year

  • Data template multiple selection problem

    Hi all,
    I have a problem with the Multiple Selection on the BI Publisher using data templates. One of my parameters is called p_application, this parameter is a integer/number and its values come from a list of values.
    I'm getting the error "....invalid number". I think the data template is not understanding that this parameter have multiple selection.
    Can you help me?
    here is my data template
    <dataTemplate name="user_reg" dataSourceRef="Thomson_Live_ EDC_Environment">
    <properties>
    <property name="include_parameters" value="false"/>
    <property name="include_null_Element" value="false"/>
    <property name="include_rowsettag" value="false"/>
    <property name="scalable_mode" value="on"/>
    <property name="db_fetch_size" value="20"/>
    <property name="scalable_mode" value="on"/>
    </properties>
    <parameters>
    <parameter name="p_customer" dataType="string" include_in_output="false"/>
    <parameter name="p_application" dataType="integer" include_in_output="false"/>
    <parameter name="p_start_date" dataType="date" include_in_output="false"/>
    <parameter name="p_final_date" dataType="date" include_in_output="false"/>
    <parameter name="p_staff_account" dataType="string" include_in_output="false"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[
    select COUNT(DISTINCT TRUNC(a.TIMESTAMP)) days_logged
    ,COUNT(a.USER_ID) logins
    ,max(a.TIMESTAMP) last_access
    ,a.application_id application_id
    ,a.user_id user_id
    from user_history_log a,
    idweb_user b,
    idweb_customer c
    where to_date(to_char(a.timestamp,'dd-mm-rrrr'),'dd-mm-rrrr') between to_date(:p_start_date,'dd-mm-rrrr') and to_date(:p_final_date,'dd-mm-rrrr')
    and a.user_id = b.user_id
    and b.customer_key = c.customer_key
    and c.staff_account = :p_staff_account
    and ('0' in (:p_customer) or b.customer_key in (:p_customer))
    and (0 in (:p_application) or a.application_id in (:p_application))
    group by a.application_id, a.user_id ]]>
    </sqlStatement>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT IDCU.CUSTOMER_NAME "Customer name"
    ,PCAP.APPLICATION_NAME "Application name"
    ,IDUS.FIRST_NAME "First name"
    ,IDUS.LAST_NAME "Last name"
    ,IDUS.USER_NAME "Username"
    ,IDUS.EMAIL_ADDRESS "Email address"
    ,IDUS.ROLE "Job Role"
    ,IDUS.AREA "Job Area"
    ,IDUS.DEPARTMENT "Specific Job Area"
    ,IDUS.CITY "City"
    ,IDUS.US_STATE "State"
    ,IDUS.COUNTRY "Country"
    ,SALE.TERRITORY_NAME "Territory/GAM"
    ,BUUN.BUSINESS_UNIT_NAME "SBU"
    ,to_char(IDUS.REGISTRATION_DATE,'dd-mm-yyyy') "Registration date"
    ,to_char(PCCA.EXPIRY_DATE,'dd-mm-yyyy') "Expiry date"
    ,DECODE(PCUA.DISABLED,'Y','Disabled','Enabled') "Status"
    ,pcua.application_id application_id
    ,pcua.user_id user_id
    FROM PC_USER_APPLICATION PCUA
    ,PC_CUSTOMER_APPLICATION PCCA
    ,IDWEB_USER IDUS
    ,IDWEB_CUSTOMER IDCU
    ,sales_territory SALE
    ,business_unit BUUN
    ,PC_APPLICATION PCAP
    WHERE BUUN.BUSINESS_UNIT_ID(+) = IDCU.SBU_ID
    AND SALE.TERRITORY_ID(+) = IDCU.TERRITORY_ID
    AND IDCU.CUSTOMER_KEY = IDUS.CUSTOMER_KEY
    AND IDUS.USER_ID = PCUA.USER_ID
    AND PCCA.CUSTOMER_KEY = IDCU.CUSTOMER_KEY
    AND PCCA.APPLICATION_ID = PCAP.APPLICATION_ID
    AND PCAP.APPLICATION_ID = PCUA.APPLICATION_ID
    AND NVL(IDUS.DISABLED,'N') = 'N'
    AND IDCU.STAFF_ACCOUNT = :p_staff_account
    AND ('0' in (:p_customer) or IDCU.CUSTOMER_KEY in (:p_customer))
    AND (0 in (:p_application) or pcap.application_id in (:p_application))
    ORDER BY IDCU.CUSTOMER_NAME, PCAP.APPLICATION_NAME, IDUS.USER_NAME ]]>
    </sqlStatement>
    <sqlStatement name="Q3">
    <![CDATA[
    select COUNT(a.TIMESTAMP) "Number of Turnaways Kickout",
    MAX(a.timestamp) "Last Turnaway Kickout",
    a.application_id,
    a.user_id
    from tpharma_user.user_refused a,
    idweb_user i
    where to_date(to_char(a.timestamp,'dd-mm-rrrr'),'dd-mm-rrrr') between to_date(:p_start_date,'dd-mm-rrrr') and to_date(:p_final_date,'dd-mm-rrrr')
    and (0 in (:p_application) or a.application_id in (:p_application))
    and a.user_id = i.user_id
    and ('0' in (:p_customer) or i.customer_key in (:p_customer))
    group by a.application_id, a.user_id ]]>
    </sqlStatement>
    <link name="ruser3" parentQuery="Q1" parentColumn="user_id" childQuery="Q3" childColumn="user_id(+)" condition="="/>
    <link name="rapp3" parentQuery="Q1" parentColumn="application_id" childQuery="Q3" childColumn="application_id(+)" condition="="/>
    <link name="ruser1" parentQuery="Q1" parentColumn="user_id" childQuery="Q2" childColumn="user_id" condition="="/>
    <link name="rapp1" parentQuery="Q1" parentColumn="application_id" childQuery="Q2" childColumn="application_id" condition="="/>
    </dataQuery>
    <dataStructure>
    <group name="G_totals1" source="Q1">
    <element name="days_logged" value="days_logged"/>
    <element name="logins" value="logins"/>
    <element name="last_access" value="last_access"/>
    <element name="application_id" value="application_id"/>
    <element name="user_id" value="user_id"/>
    </group>
    <group name="G_main" source="Q2">
    <element name="Customer name" value="Customer name">
    <element name="Application name" value="Application name">
    <element name="First name" value="First name">
    <element name="Last name" value="Last name">
    <element name="Username" value="Username">
    <element name="Email address" value="Email address">
    <element name="Job Role" value="Job Role">
    <element name="Job Area" value="Job Area">
    <element name="Specific Job Area" value="Specific Job Area">
    <element name="City" value="City">
    <element name="State" value="State">
    <element name="Country" value="Country">
    <element name="Territory/GAM" value="Territory/GAM">
    <element name="SBU" value="SBU">
    <element name="Registration date" value="Registration date">
    <element name="Expiry date" value="Expiry date">
    <element name="Status" value="Status">
    <element name="application_id" value="application_id"/>
    <element name="user_id" value="user_id"/>
    </group>
    <group name="G_main" source="Q3">
    <element name="Number of Turnaways Kickout" value="Number of Turnaways Kickout"/>
    <element name="Last Turnaway Kickout" value="Last Turnaway Kickout"/>
    <element name="application_id" value="application_id"/>
    <element name="user_id" value="user_id"/>
    </group>
    </dataStructure>
    </dataTemplate>
    on the XDO file, the parameters are:
    <parameters>
    <parameter id="p_customer" defaultValue="8c3ff6ad5eh5c8" dataType="xsd:string">
    <select label="Customer: " valueSet="lv_customer" multiple="true" all="false" allValue="lov"/>
    </parameter>
    <parameter id="p_application" defaultValue="1" dataType="xsd:integer">
    <select label="Application: " valueSet="LV_application" multiple="true" all="false" allValue="lov"/>
    </parameter>
    <parameter id="p_start_date" defaultValue="{$SYSDATE()$}" dataType="xsd:date">
    <date label="Usage occurs on or after (dd-mm-yyyy):" size="11" format="dd-MM-yyyy" minValue="01-06-1950" maxValue="01-06-2100"/>
    </parameter>
    <parameter id="p_final_date" defaultValue="{$SYSDATE()$}" dataType="xsd:date">
    <date label="Usage occurs on or before (dd-mm-yyyy):" size="11" format="dd-MM-yyyy" minValue="01-06-1950" maxValue="01-06-2100"/>
    </parameter>
    <parameter id="p_staff_account" defaultValue="Y">
    <select label="Staff Accout: " valueSet="lv_staff_account" multiple="false" all="false" allValue="null"/>
    </parameter>
    </parameters>
    Thank you,
    Marcelo Cure
    Oracle Developer
    [email protected]
    www.ilegra.com
    Edited by: user11307652 on 09/03/2010 05:21
    Edited by: user11307652 on 09/03/2010 06:15

    I have a similar problem where i cannot use the parameter with comma separated values in the parameter.
    my report definition is as below.
    <dataTemplate name="COMLTRDATA" description="Data for the COMLTR letters" dataSourceRef="PRISM">
                        <parameters>
                             <parameter name="secondary_sequence" dataType="number" include_in_output="false"/>
                        </parameters>
                        <dataQuery>
                             <sqlStatement name="Q1">
                                  <![CDATA[select     PR_LETTER_MASTER.LETTER_ID as LETTER_ID,
         to_char(PR_LETTER_MASTER.LETTER_DATE,'FMMonth DD, RRRR') as LETTER_DATE,
         PR_LETTER_MASTER.LETTER_NAME as LETTER_NAME,
         PR_LETTER_MASTER.ADDRESS_TYPE as ADDRESS_TYPE,
         PR_LETTER_MASTER.REVIEWED_FIRM_NUMBER as REVIEWED_FIRM_NUMBER,
         PR_LETTER_MASTER.REVIEWED_FIRM_NAME as REVIEWED_FIRM_NAME,
         PR_LETTER_MASTER.REVIEWED_FIRM_TYPE as REVIEWED_FIRM_TYPE,
         PR_LETTER_MASTER.REVIEWING_FIRM_NUMBER as REVIEWING_FIRM_NUMBER,
         PR_LETTER_MASTER.REVIEW_NUMBER as REVIEW_NUMBER,
             PR_LETTER_MASTER.SALUTATION as SALUTATION,
             PR_LETTER_MASTER.SIGNATURE_EMAIL_ID as SIGNATURE_EMAIL_ID,
             PR_LETTER_MASTER.SIGNATURE_TITLE as SIGNATURE_TITLE,
         PR_LETTER_MASTER.REVIEW_STATUS as REVIEW_STATUS,
         to_char(PR_LETTER_MASTER.REVIEW_COMMENCEMENT_DATE,'FMMonth DD, RRRR') as REVIEW_COMMENCEMENT_DATE,
         to_char(PR_LETTER_MASTER.REVIEW_DUE_DATE,'FMMonth DD, RRRR') as REVIEW_DUE_DATE,
         PR_LETTER_MASTER.REVIEW_YEAR as REVIEW_YEAR,
         PR_LETTER_MASTER.REVIEW_PROGRAM as REVIEW_PROGRAM,
             PR_LETTER_MASTER.REVIEW_TYPE as REVIEW_TYPE,
             PR_LETTER_MASTER.TEAM_CAPT_FIRM_NAME as TEAM_CAPT_FIRM_NAME,
         PR_LETTER_MASTER.PRIOR_REVIEW_NUMBER as PRIOR_REVIEW_NUMBER,
         PR_LETTER_MASTER.MNGPTR_MEMBER_NUMBER as MNGPTR_MEMBER_NUMBER,
         PR_LETTER_MASTER.FIRST_NAME as FIRST_NAME,
         PR_LETTER_MASTER.MIDDLE_INITIAL as MIDDLE_INITIAL,
         PR_LETTER_MASTER.LAST_NAME as LAST_NAME,
         PR_LETTER_MASTER.ADDRESS_LINE1 as ADDRESS_LINE1,
         PR_LETTER_MASTER.ADDRESS_LINE2 as ADDRESS_LINE2,
         PR_LETTER_MASTER.ADDRESS_LINE3 as ADDRESS_LINE3,
         PR_LETTER_MASTER.CITY as CITY,
         PR_LETTER_MASTER.STATE as STATE,
         PR_LETTER_MASTER.ZIP as ZIP,
         PR_LETTER_MASTER.ZIP_PLUS as ZIP_PLUS,
         PR_LETTER_MASTER.DELIVERY_EMAIL_ID as DELIVERY_EMAIL_ID,
         PR_LETTER_MASTER.SIGNATURE_TYPE as SIGNATURE_TYPE,
         PR_LETTER_MASTER.SIGNATURE_NAME as SIGNATURE_NAME,
         PR_LETTER_MASTER.TEAM_CAPT_MEMBER_NUMBER as TEAM_CAPT_MEMBER_NUMBER,
         PR_LETTER_MASTER.SIGNATURE_PHONE_NUMBER as SIGNATURE_PHONE_NUMBER,
         PR_LETTER_MASTER.LAST_LETTER_SENT_DATE1 as LAST_LETTER_SENT_DATE1,
         PR_LETTER_MASTER.LAST_LETTER_SENT_DATE2 as LAST_LETTER_SENT_DATE2,
         PR_LETTER_MASTER.LAST_LETTER_SENT_DATE3 as LAST_LETTER_SENT_DATE3,
        to_char(PR_LETTER_MASTER.EXIT_CONFERENCE_DATE,'FMMonth DD, RRRR') as EXIT_CONFERENCE_DATE,
         PR_LETTER_MASTER.REVIEW_TAX_SEASON as REVIEW_TAX_SEASON,
             PR_LETTER_MASTER.STATE_SOCIETY_NUM as STATE_SOCIETY_NUM,
             PR_LETTER_MASTER.STATE_SOCIETY_NAME as STATE_SOCIETY_NAME,
         PR_LETTER_MASTER.SECONDARY_LETTER_SEQUENCE as SECONDARY_LETTER_SEQUENCE,
         PR_LETTER_MASTER.CREATION_DATE as CREATION_DATE,
         PR_LETTER_MASTER.STATE_CODE as STATE_CODE ,
             PR_LETTER_MASTER.DELIVERY_EMAIL_ID as DELIVERY_EMAIL_ID,
             PR_LETTER_MASTER.TEAM_CAPT_FIRST_NAME as TEAM_CAPT_FIRST_NAME,
             PR_LETTER_MASTER.TEAM_CAPT_LAST_NAME as TEAM_CAPT_LAST_NAME,
             to_char(PR_LETTER_MASTER.DT_RAB_PRESENTATION,'FMMonth DD, RRRR') as DT_RAB_PRESENTATION,
             PR_LETTER_MASTER.RAB_DESCRIPTION as RAB_DESCRIPTION ,
             PR_LETTER_MASTER.TEAM_CAPT_MIDDLE_INITIAL as TEAM_CAPT_MIDDLE_INITIAL,
    pr_letter_master.salutation as Salutation
    from      PRISM.PR_LETTER_MASTER PR_LETTER_MASTER
    where secondary_letter_sequence in (:secondary_sequence)]]>
                             </sqlStatement>
                             <sqlStatement name="Q2">
                                  <![CDATA[select followup_description from pr_letter_details where secondary_letter_sequence = :SECONDARY_LETTER_SEQUENCE]]>
                             </sqlStatement>
                        </dataQuery>
                        <dataStructure>
                             <group name="letter1" source="Q1">
                                  <element name="LETTER_DATE" value="LETTER_DATE"/>
                                  <element name="FIRST_NAME" value="FIRST_NAME"/>
                                  <element name="MIDDLE_INITIAL" value="MIDDLE_INITIAL"/>
                                  <element name="LAST_NAME" value="LAST_NAME"/>
                                  <element name="ADDRESS_LINE1" value="ADDRESS_LINE1"/>
                                  <element name="ADDRESS_LINE2" value="ADDRESS_LINE2"/>
                                  <element name="ADDRESS_LINE3" value="ADDRESS_LINE3"/>
                                  <element name="CITY" value="CITY"/>
                                  <element name="STATE" value="STATE"/>
                                  <element name="ZIP" value="ZIP"/>
                                  <element name="ZIP_PLUS" value="ZIP_PLUS"/>
                                  <element name="SALUTATION" value="SALUTATION"/>
                                  <element name="REVIEW_TYPE" value="REVIEW_TYPE"/>
                                  <element name="DT_RAB_PRESENTATION" value="DT_RAB_PRESENTATION"/>
                                  <element name="RAB_DESCRIPTION" value="RAB_DESCRIPTION"/>
                                  <element name="SIGNATURE_NAME" value="SIGNATURE_NAME"/>
                                  <element name="SIGNATURE_PHONE_NUMBER" value="SIGNATURE_PHONE_NUMBER"/>
                                  <element name="SIGNATURE_TITLE" value="SIGNATURE_TITLE"/>
                                  <element name="SIGNATURE_EMAIL_ID" value="SIGNATURE_EMAIL_ID"/>
                                  <element name="TEAM_CAPT_MIDDLE_INITIAL" value="TEAM_CAPT_MIDDLE_INITIAL"/>
                                  <element name="TEAM_CAPT_FIRST_NAME" value="TEAM_CAPT_FIRST_NAME"/>
                                  <element name="TEAM_CAPT_LAST_NAME" value="TEAM_CAPT_LAST_NAME"/>
                                  <element name="REVIEWED_FIRM_NUMBER" value="REVIEWED_FIRM_NUMBER"/>
                                  <element name="REVIEWED_FIRM_NAME" value="REVIEWED_FIRM_NAME"/>
                                  <element name="REVIEW_NUMBER" value="REVIEW_NUMBER"/>
                                  <element name="LETTER_ID" value="LETTER_ID"/>
                                  <group name="Detail" source="Q2">
                                       <element name="followup_description" value="followup_description"/>
                                  </group>
                             </group>
                        </dataStructure>
                   </dataTemplate>

  • Data template and procedure output parameters

    Hi all,
    I have multiple sql statements and a MSSQL procedure witch I have to call when generating a report.
    Therefore I use a data template.
    The MSSQL procedure I call with EXEC. It returns the table that it sould return and everything is fine.
    Except: the procedure also returns a punch of OUTPUT parameters and I don't know how to catch those parameters in my data template.
    I have declared all these parameters in the BIP and also in the data template, but there are no values for them when I execute the report.
    Here is a my current data template:
    <dataTemplate name="NameOfTemplate">
    <properties>
      <property name="include_parameters" value="true"/>
    </properties>
    <parameters>
         <parameter name="clientID" dataType="character"/>
         <parameter name="dept" dataType="number" /> <!--This is for MSSQL output-->
         <parameter name="forpay" dataType="number"/> <!--This is for MSSQL output-->
        <parameter name="name" dataType="character"/> <!--This is for MSSQL output-->
    </parameters>
    <dataQuery>
         <sqlStatement name="ARVE" dataSourceRef="connection1">
              <![CDATA[
              select
              from
                   OAP.ACCOUNTS
              where
                   ACCOUNTS.CLIENT_CODE = :clientID
              ]]>
         </sqlStatement>
         <sqlStatement name="ARVE_T" dataSourceRef="connection2" fixedSchema="false">
              <![CDATA[EXEC Dept_proc
                   @ID = :clientID,
                   @Volg =:dept,
                   @Ettemaks =:forpay,
                   @Nimi =:name]]>
        </sqlStatement>
      </dataQuery>
      <dataStructure>
         <group name="ARVE_TULEMUS" source="ARVE">
              <element name="ACCOUNT_SUM" value="SUMMA"/>
         </group>
         <group name="ARVE_TULEMUS" source="ARVE_T">
              <element name="ARVE_NUMBER" value="ARVENUMBER"/>
              <element name="ARVE_KUUPAEV" value="ARVEKUUPAEV"/>
              <element name="ARVE_LEPINGU_SALDO" value="VOLGUSUMMA"/>
         </group>
      </dataStructure>
    </dataTemplate>Where @Volg, @Ettemaks and @Nimi are MSSQL procedure output parameters that I want to show in my report.
    Can anyone give ma an example how to do this?

    Hi all,
    I have multiple sql statements and a MSSQL procedure witch I have to call when generating a report.
    Therefore I use a data template.
    The MSSQL procedure I call with EXEC. It returns the table that it sould return and everything is fine.
    Except: the procedure also returns a punch of OUTPUT parameters and I don't know how to catch those parameters in my data template.
    I have declared all these parameters in the BIP and also in the data template, but there are no values for them when I execute the report.
    Here is a my current data template:
    <dataTemplate name="NameOfTemplate">
    <properties>
      <property name="include_parameters" value="true"/>
    </properties>
    <parameters>
         <parameter name="clientID" dataType="character"/>
         <parameter name="dept" dataType="number" /> <!--This is for MSSQL output-->
         <parameter name="forpay" dataType="number"/> <!--This is for MSSQL output-->
        <parameter name="name" dataType="character"/> <!--This is for MSSQL output-->
    </parameters>
    <dataQuery>
         <sqlStatement name="ARVE" dataSourceRef="connection1">
              <![CDATA[
              select
              from
                   OAP.ACCOUNTS
              where
                   ACCOUNTS.CLIENT_CODE = :clientID
              ]]>
         </sqlStatement>
         <sqlStatement name="ARVE_T" dataSourceRef="connection2" fixedSchema="false">
              <![CDATA[EXEC Dept_proc
                   @ID = :clientID,
                   @Volg =:dept,
                   @Ettemaks =:forpay,
                   @Nimi =:name]]>
        </sqlStatement>
      </dataQuery>
      <dataStructure>
         <group name="ARVE_TULEMUS" source="ARVE">
              <element name="ACCOUNT_SUM" value="SUMMA"/>
         </group>
         <group name="ARVE_TULEMUS" source="ARVE_T">
              <element name="ARVE_NUMBER" value="ARVENUMBER"/>
              <element name="ARVE_KUUPAEV" value="ARVEKUUPAEV"/>
              <element name="ARVE_LEPINGU_SALDO" value="VOLGUSUMMA"/>
         </group>
      </dataStructure>
    </dataTemplate>Where @Volg, @Ettemaks and @Nimi are MSSQL procedure output parameters that I want to show in my report.
    Can anyone give ma an example how to do this?

Maybe you are looking for

  • ZfD 3.2 SP2 Abends JVM 1.3.1 on Netware 5.1 SP6e

    After applying SP2 patch to Netware 5.1 SP6(e), abend in JVM happens when starting ZfD3.2: FSERVER1:zfdstart Loading module NWSNUT.NLM This module is ALREADY loaded and cannot be loaded more than once. Loading module JAVA.NLM Novell JVM Version 1.3.1

  • How do I create an outline in illustrator?

    Hello All, I am trying to create artwork for printing and I have been asked to save the document as an eps file. This is the file: I need the sbsgroup to be an outline and be transparent in the middle...how do I remove the blue from the background? I

  • Azure API and tokens issued by azure AD

    anyone know of a sample that showcases the azure API management/delivery feature consuming (access) tokens issued by Azure AD? is there a reasons why its not even a sensible thing to conceive? (it seems obvious...but perhaps I have a disconnect somew

  • Eject drive warning on wake up

    Whenever I wake up my iMac when I've been away from it for a while there's a warning message saying I should eject external drives before powerin them off.  This is about a Toshiba 1Tb usb drive that's got my Time Machine back-ups on it.  I even get

  • -rw-r--r--@

    Using Mac OS X Server 10.5.8... -rw-r--r--@ Any file with the @ symbol in the permissions on my server cannot be copied to an XP computer. I get a message that says: "cannot read from the source file or disk." These are files that have been sent to m