Data Template Question

Okay, I'm stumped and the answer is probably right in front of me.
Whenver I put the LESS THAN symbol in a sql statement, the template obviously thinks I'm starting a new tag. Anyone have a suggestion on how to do a LESS THAN in a template? I could use a BETWEEN, but I don't want to unless that is my only option.
<sqlstatement name="EMPLOYEES">
<![CDATA[SELECT emp_id,
emp_name
FROM employees
WHERE emp_id <= 10]]>
</sqlstatement>
Thanks -

You can solve this by using &amp;lt; instead of <= ( less than) .
try this.
<![CDATA[SELECT emp_id,
emp_name
FROM employees
WHERE emp_id  &amp;lt;=  10]]>
let me if does not work,it worked for me.
- Madan
Edited by: Madan Thota on May 8, 2009 7:02 PM

Similar Messages

  • XML/RTF Data Template Question : Linking

    Ok, I have my data template here however when I try to print it, BIP makes no attempt to link the queries. I am using the Bind Method here with an XML Data Template.
    Data template is:
    <dataTemplate name="Orders_Dataset" description="List of Orders with Details" dataSourceRef="COE" defaultPackage="results_report">
    <parameters>
    <parameter name="TERM" dataType="character"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="People_Query">
    <![CDATA[SELECT DISTINCT PERSON Personp, RECTYPE RECTYPEP, SEC SECP, TERM TERMP, (SELECT TERMNAME FROM TERM b WHERE b.BANNER_CODE = TERM ) termnamep, PERSON || ' ' || SEC PERSEC FROM COE_DATA]]>
    </sqlStatement>
    <sqlStatement name="General_Questions_Query">
    <![CDATA[select DISTINCT d.PERSON PERSON, d.SEC SEC, q.Q_Number Q_Number, q.Q_ID Q_ID, TRIM(q.TEXT) text, TRIM(q.A1) A1, TRIM(q.A2) A2, TRIM(q.A3) A3, TRIM(q.A4) A4, TRIM(q.A5) A5, TRIM(A6) A6 from  COE_DATA d, coe_questions q WHERE q.Q_Number = d.Q_ID and Q_Number < 6 and d.Person = :Personp order by Q_Number]]>
    </sqlStatement>
    <sqlStatement name="Department_Questions_Query">
    <![CDATA[select DISTINCT d.PERSON PERSON, d.SEC SEC, q.Q_Number Q_Number, q.Q_ID Q_ID, TRIM(q.TEXT) text, TRIM(q.A1) A1, TRIM(q.A2) A2, TRIM(q.A3) A3, TRIM(q.A4) A4, TRIM(q.A5) A5, TRIM(A6) A6 from  COE_DATA d, coe_questions q WHERE q.Q_Number = d.Q_ID and d.Person = :Personp order by Q_Number]]>
    </sqlStatement>
    <sqlStatement name="Results_Query">
    <![CDATA[SELECT DISTINCT a.person person, a.rectype rectype, a.sec sec, a.term term, a.Q_ID q_id,
    NVL((SELECT b.PERCENTVALUE FROM coe_data b where a.person = b.person and a.rectype = b.RECTYPE and a.sec = b.sec and a.term = b.term and a.Q_ID = b.Q_ID and b.AD_ID = 1 ), '0 |  0.00%') A1,
    NVL((SELECT c.PERCENTVALUE FROM coe_data c where a.person = c.person and a.rectype = c.RECTYPE and a.sec = c.sec and a.term = c.term and a.Q_ID = c.Q_ID and c.AD_ID = 2 ), '0 |  0.00%') A2,
    NVL((SELECT d.PERCENTVALUE FROM coe_data d where a.person = d.person and a.rectype = d.RECTYPE and a.sec = d.sec and a.term = d.term and a.Q_ID = d.Q_ID and d.AD_ID = 3 ), '0 |  0.00%') A3,
    NVL((SELECT f.PERCENTVALUE FROM coe_data f where a.person = f.person and a.rectype = f.RECTYPE and a.sec = f.sec and a.term = f.term and a.Q_ID = f.Q_ID and f.AD_ID = 4 ), '0 |  0.00%') A4,
    NVL((SELECT g.PERCENTVALUE FROM coe_data g where a.person = g.person and a.rectype = g.RECTYPE and a.sec = g.sec and a.term = g.term and a.Q_ID = g.Q_ID and g.AD_ID = 5 ), '0 |  0.00%') A5,
    NVL((SELECT h.PERCENTVALUE FROM coe_data h where a.person = h.person and a.rectype = h.RECTYPE and a.sec = h.sec and a.term = h.term and a.Q_ID = h.Q_ID and h.AD_ID = 6 ), '0 |  0.00%') A6, 1 o_id
      FROM coe_data a where term = :termp and a.Q_ID = :Q_Number and a.sec = 'COE' and a.person = 'COE'
    UNION
    SELECT DISTINCT a.person person, a.rectype rectype, a.sec sec, a.term term, a.Q_ID q_id,
    NVL((SELECT b.PERCENTVALUE FROM coe_data b where a.person = b.person and a.rectype = b.RECTYPE and a.sec = b.sec and a.term = b.term and a.Q_ID = b.Q_ID and b.AD_ID = 1 ), '0 |  0.00%') A1,
    NVL((SELECT c.PERCENTVALUE FROM coe_data c where a.person = c.person and a.rectype = c.RECTYPE and a.sec = c.sec and a.term = c.term and a.Q_ID = c.Q_ID and c.AD_ID = 2 ), '0 |  0.00%') A2,
    NVL((SELECT d.PERCENTVALUE FROM coe_data d where a.person = d.person and a.rectype = d.RECTYPE and a.sec = d.sec and a.term = d.term and a.Q_ID = d.Q_ID and d.AD_ID = 3 ), '0 |  0.00%') A3,
    NVL((SELECT f.PERCENTVALUE FROM coe_data f where a.person = f.person and a.rectype = f.RECTYPE and a.sec = f.sec and a.term = f.term and a.Q_ID = f.Q_ID and f.AD_ID = 4 ), '0 |  0.00%') A4,
    NVL((SELECT g.PERCENTVALUE FROM coe_data g where a.person = g.person and a.rectype = g.RECTYPE and a.sec = g.sec and a.term = g.term and a.Q_ID = g.Q_ID and g.AD_ID = 5 ), '0 |  0.00%') A5,
    NVL((SELECT h.PERCENTVALUE FROM coe_data h where a.person = h.person and a.rectype = h.RECTYPE and a.sec = h.sec and a.term = h.term and a.Q_ID = h.Q_ID and h.AD_ID = 6 ), '0 |  0.00%') A6, 2 o_id
      FROM coe_data a where term = :termp and a.Q_ID = :Q_Number and a.sec = :secp and a.person = :secp
    UNION
    SELECT DISTINCT a.person person, a.rectype rectype, a.sec sec, a.term term, a.Q_ID q_id,
    NVL((SELECT b.PERCENTVALUE FROM coe_data b where a.person = b.person and a.rectype = b.RECTYPE and a.sec = b.sec and a.term = b.term and a.Q_ID = b.Q_ID and b.AD_ID = 1 ), '0 |  0.00%') A1,
    NVL((SELECT c.PERCENTVALUE FROM coe_data c where a.person = c.person and a.rectype = c.RECTYPE and a.sec = c.sec and a.term = c.term and a.Q_ID = c.Q_ID and c.AD_ID = 2 ), '0 |  0.00%') A2,
    NVL((SELECT d.PERCENTVALUE FROM coe_data d where a.person = d.person and a.rectype = d.RECTYPE and a.sec = d.sec and a.term = d.term and a.Q_ID = d.Q_ID and d.AD_ID = 3 ), '0 |  0.00%') A3,
    NVL((SELECT f.PERCENTVALUE FROM coe_data f where a.person = f.person and a.rectype = f.RECTYPE and a.sec = f.sec and a.term = f.term and a.Q_ID = f.Q_ID and f.AD_ID = 4 ), '0 |  0.00%') A4,
    NVL((SELECT g.PERCENTVALUE FROM coe_data g where a.person = g.person and a.rectype = g.RECTYPE and a.sec = g.sec and a.term = g.term and a.Q_ID = g.Q_ID and g.AD_ID = 5 ), '0 |  0.00%') A5,
    NVL((SELECT h.PERCENTVALUE FROM coe_data h where a.person = h.person and a.rectype = h.RECTYPE and a.sec = h.sec and a.term = h.term and a.Q_ID = h.Q_ID and h.AD_ID = 6 ), '0 |  0.00%') A6, 3 o_id
      FROM coe_data a where term = :TERMP and a.Q_ID = :Q_NUMBER and a.sec = :SECP and a.person = :PERSONP order by o_id, rectype]]>
    </sqlStatement>
    </dataQuery>
    <!--dataTrigger name="beforeReport" source="results_report.beforeReportTrigger"/-->
    <dataStructure>
    <group name="G_People" source="People_Query">
    <element name="Person" value="personp"/>
    <element name="Section" value="secp"/>
    <element name="Course_Number" value="RECTYPEP"/>
    <element name="Term" value="TERMP"/>
    <element name="PERSEC" value="PERSEC"/>
    <group name="G_GENERAL_QUESTIONS" source="Department_Questions_Query">
    <element name="GQuestion_Text" value="text"/>
    <element name="GQuestion_Number" value="Q_Number"/>
    <element name="GQ1" value="A1"/>
    <element name="GQ2" value="A2"/>
    <element name="GQ3" value="A3"/>
    <element name="GQ4" value="A4"/>
    <element name="GQ5" value="A5"/>
    <element name="GQ6" value="A6"/>
    <group name="G_GENERAL_ANSWERS" source="Results_Query">
    <element name="GAPerson" value="person"/>
    <element name="GArec" value="rectype"/>
    <element name="GAsec" value="sec"/>
    <element name="GARQ_ID" value="Q_ID"/>
    <element name="GA1" value="A1"/>
    <element name="GA2" value="A2"/>
    <element name="GA3" value="A3"/>
    <element name="GA4" value="A4"/>
    <element name="GA5" value="A5"/>
    <element name="GA6" value="A6"/>
    </group>
    </group>
    <group name="G_DEPARTMENT_QUESTIONS" source="Department_Questions_Query">
    <element name="DQuestion_Text" value="text"/>
    <element name="DQuestion_Number" value="Q_Number"/>
    <element name="DQ1" value="A1"/>
    <element name="DQ2" value="A2"/>
    <element name="DQ3" value="A3"/>
    <element name="DQ4" value="A4"/>
    <element name="DQ5" value="A5"/>
    <element name="DQ6" value="A6"/>
    <group name="G_DEPARTMENT_ANSWERS" source="Results_Query">
    <element name="DAPerson" value="person"/>
    <element name="DArec" value="rectype"/>
    <element name="DAsec" value="sec"/>
    <element name="DARQ_ID" value="Q_ID"/>
    <element name="DA1" value="A1"/>
    <element name="DA2" value="A2"/>
    <element name="DA3" value="A3"/>
    <element name="DA4" value="A4"/>
    <element name="DA5" value="A5"/>
    <element name="DA6" value="A6"/>
    </group>
    </group>
    </group>
    </dataStructure>
    </dataTemplate>
    I am trying to establish all my linking in this data template. However I noticed a discrepancy between the expected output and what I received. For some reason at the 3rd level of the dataStructure (the answer level), it restarts at Q_ID = 1 instead of whatever the Q_Number is from the level above. In my case all of the answers are in the same table regardless of category. Can someone offer up any help with fixing my template?
    I did notice something odd, for G_DEPARTMENT_ANSWERS it is working correct but does not work for G_GENERAL_ANSWERS.

    Warren,
    You need to select data source type as DataTemplate and then cut and paste your DataTemplate in the text editor window.
    Make sure you define the dataSourceRef in dataTemplate Header. The dataSourceRef is the DataSource (JDBC Connection) you define through Administartion.
    <dataTemplate name="Employee" description="Template description" dataSourceRef="demo">
    -Ashish

  • Data Template construction AND data template validation questions:

    Hello World.
    I am new to Oracle BI and I have sucessfully used the BI Java APIs to create from start to finish a pdf report process. I use the DataProcessor, RTFProcessor, and FOProcessor classes to do this. My question is other than the most simple of Data Templates being used, how is everyone building their data templates? And I would also like to know how are developers validating the actual data template file? I have submitted a request through my MetaLink account for obtaining either a "dtd" or "xsd" file that could be used to validate a constructed data template. I have not received any real answers. I plan on using either XMLSpy or MyEclispse 6 to create my data templates, but I need a "rule book" dtd or xsd file in order to use the auto prompting feature. Making a data template "in the dark" cannot be the method of choice for all of the developers that visit this forum. I see some really fancy/detailed reports and I would like to see how people are building there data templates. Building the data template is at least half the battle when constructing a BI report.
    Thanks for your time.

    Notepad is the developer's choice for data definitions, seriously.
    I have seen and used XMLSpy and have Stylus Studio but they are really a bit of overkill for the data templates. I use Stylus Studio for some of our XML-FO format templates, but that is another story.
    Scott
    Edited by: ScottC on Oct 22, 2008 3:00 PM

  • How to handle errors in data templates

    Hi
    What is the recommended way to handle errors for example if one of your SQL statement in a data template returned no data how and where would you be able to create an error message for the user to find and read.
    Thanks,
    Mark

    The closest I have come to doing this is to put conditional statements into the format template. If a value matches an expected (ex. is null) you can return a message (in the report) via the format template (ex. "No Data Found").
    I am not sure this really answers your question as this is in the format template, but I generally view them as a matched pair that work together. I try to stick with data extraction in the data define, and do all my conditional stuff in the format templates.
    Scott

  • Is it possible to use an XML Data Template to create a report in APEX?

    Hi,
    I have created an XML Data Template in BI Publisher passing one parameter and running two queries, then created an RTF Document Template to present the data.
    I can create a nice report in BI Publisher using the two elements. I have used RTF Document Templates to publish reports in APEX but the data comes from a Report region running a single query.
    I would like to run a report based in this kind of XML Data Template, in order to use several children queries related to a parent query. Is it possible to do it in APEX, or you have to use BI Publisher?
    Francisco
    ===========================
    Below is a simple data template definition:
    <dataTemplate name="cotizacion_template" description="Prueba de data template para cotizaciones" dataSourceRef="dbxprts">
         <parameters>
              <parameter name="p_id_cotizacion" dataType="character" defaultValue="1009" include_in_output="true"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="header_query">
                   <![CDATA[select id_cotizacion, fecha_cotizacion, id_clipro from f_cotizaciones where id_cotizacion = :p_id_cotizacion]]>
              </sqlStatement>
              <sqlStatement name="detail_query">
                   <![CDATA[select id_cotizacion as id_cot_child, id_detalle_cotizacion, partida, cantidad, id_producto from f_detalle_cotizaciones where id_cotizacion = :id_cotizacion]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="F_COTIZACIONES" source="header_query">
                   <element name="ID_COTIZACION" value="ID_COTIZACION"/>
                   <element name="ID_CLIPRO" value="ID_CLIPRO"/>
                   <element name="SUMA_CANTIDAD" value="F_DETALLE_COTIZACIONES.CANTIDAD" function="SUM()"/>
                   <group name="F_DETALLE_COTIZACIONES" source="detail_query">
                        <element name="PARTIDA" value="PARTIDA"/>
                        <element name="CANTIDAD" value="CANTIDAD"/>
                        <element name="ID_PRODUCTO" value="ID_PRODUCTO"/>
                   </group>
              </group>
         </dataStructure>
    </dataTemplate>

    Hi,
    I have the similar question. I used data templates in BI Publisher but now I want to use the same data template in Apex to print some reports.
    I tried to some examples but these were only using report queries. I also tried with the Web Service but this didn't work for me either maybe because I didn't
    used it in the right way. When I used the WS I received the binary of the report so the WS worked it was just the how and where to use it that didn't work for me.
    Now this older entry is BUMPED maybe we find a solution for our problem this way.
    regards,
    Steven

  • EBS: Email XML publisher output, from After Report Trigger in Data Template

    Here is what I'm trying to do:
    -- In EBS (11.5.10 CU2), I'm using XML publisher (5.6.2) data template and layout template to generate Output files (PDF, EXCEL etc)
    --In the Data Template's AfterReport Trigger, I'm using the Concurrent Request Id to locate the Output file name and trying to Email that output file.
    Problem:
    -- When the AfterReport trigger code is executed, the code is NOT seeing the output file and hence the file is NOT emailed.
    Observations/Questions:
    -- From what I observe, the Output Post Processor ( that generates the Excel / PDF files) is running AFTER the code in AfterReport trigger... and hence the AfterReport trigger is Not quite seeing / able to access the output file.
    So, the sequence of execution seems to be:
    -- Before Report Trigger
    -- Data Query (SQL statement)
    -- After Report Trigger
    -- Output Post Processor
    Because the AfterReport Trigger is running before the Output Post Processor, it is Not able to see the output file. Is that a True statement?
    If Yes, how else can the DataTemplate access the Output file?
    If No, what could cause the AfterReport trigger to not see the output file?

    Because the AfterReport Trigger is running before the Output Post Processor, it is Not able to see the output file. Is that a True statement?
    I believe so, as the OPP works on the output of the Report after the Report has completed execution.
    You could use the same approach as we do for bursting the report to different users. Write a Java Concurrent program based on "oracle.apps.xdo.oa.cp. XMLPReportBurst" with delivery channel Email to send the email output. You would need to add code to launch the Concurrent child request in your AfterReport Trigger:
    function AfterReport return boolean is
    jreq_id number;
    begin
    srw.message (100, 'DEBUG: AfterReport_Trigger +');
    jreq_id:= FND_REQUEST.SUBMIT_REQUEST ('XDO','XDOBURST','','',FALSE,:P_CONC_REQUEST_ID,'Y',chr(0),
    If (jreq_id=0)
    then
    srw.message (100,'Request id is zero');
    end if;

  • 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

  • One record in the master Query, many in the child. Data Template Woes

    Hi Folks.
    Can't get my head around this and I wonder if anyone could shed some light.
    I have the following simple data template set up.
    <dataTemplate name="Invoice" description="Default Invoice" version="1.0">
    <parameters>
    <parameter name="P_INVOICE_ID" dataType="character"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[select invoice_id                  
                 from vw_invoice_summary
                 where invoice_id IN (:P_INVOICE_ID)]]>
    </sqlStatement>
    <sqlStatement name="Q2">
    <![CDATA[Select invoice_line_item_id
                from invoice_line_item
                 where invoice_id = :invoice_id]]>
    </sqlStatement>
    </dataQuery>
    </dataTemplate>
    When I set the Parameter to a valid invoice ID, I only get the following result. There should be two sets of data being returned. One set with the single parent record and the second set with roughly thirty records.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <INVOICE>
    <P_INVOICE_ID>16946</P_INVOICE_ID>
    - <LIST_Q1>
    - <Q1>
    <INVOICE_ID>16946</INVOICE_ID>
    </Q1>
    </LIST_Q1>
    </INVOICE>
    Where is the Q2 data set? Can anyone see what I'm doing wrong? Can anyone point me to the right section of the documentation? I have read and re-read the BIP Users Guide (Section 4) but I guess I must be missing something.
    Any help gratefully received.
    Many thanks.
    Simon

    Hi Ike.
    Quick question for you.
    I have the Groups defined and my template is working well with them.
    My final sticking point is the incorporation of a parameter.
    My template starts like this...
    <dataTemplate name="Invoice" description="Invoice">
    <parameters>
    <parameter name="invoiceid"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[select * from vw_invoice
                       where invoice_id IN(:invoiceid)]]>
    </sqlStatement>
    <sqlStatement name="Q2">
    <![CDATA[Select.................
    I am trying to call it using a SOAP Envelope containing this...
    <parameterNameValues>
    <item>
    <name>invoiceid</name>
    <multiValuesAllowed>true</multiValuesAllowed>
    <values>
    <item>18421,16946,19178</item>
    </values>
    </item>
    </parameterNameValues>
    The result being recorded in BIP Schedules is "Data not defined".
    What am I doing wrong? Any thoughts?
    Kind regards.
    Simon.

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

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

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

  • 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

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

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

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

  • 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

  • Data Template using sql query

    Hi All,
    I'm trying generate xml data using data template approach. For this do i need to use XSQL to generate xml data?
    Can some one please tell me what is this XSQL and how it works?
    Thanks in advance,

    Hi Srini,
    Thank you very much for the link, its elucidates the xml data generation process using data template.
    One more question: is this method called (uses) XSQL anywhere??
    Thanks,

  • Report Trigger Code in Data Template

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

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

  • Data Template Designer

    Hi there,
    Can anyone enlighten me - what options exist to create data templates other than hand crafting the XML? Is there a BI Publisher data template designer available? We are using BI Publisher as part of E-Business Suite (11.5.10.2)
    Also, does any utility exist which will take a SQL statement and create an valid data template based on it?
    Thanks,
    - Matt

    [email protected] wrote:
    > If I correctly understand what you're trying to do then Adobe XPAAJ should be adquate:
    >
    >
    >
    > Below is a link to a "video" demonstration of building an application that uses XPAAJ:
    >
    >
    >
    > (I don't think your question about having to write an XDP file is crucial to what you're trying to do, but you don't need to write an XDP file -- it is a "save as" option within Designer. You can save a Designer file as either PDF or XDP. Or both, one after the other, if you need both.)
    Careful with the recommendations for XPAAJ. There are specific restrictions around whether you can
    use XPAAJ or not. Specifically, you have to own a copy of one of the server-based LiveCycle
    products. This does not include LiveCycle Designer, which is a client product.
    Maybe someone from Adobe can clarify.
    Justin Klei
    Cardinal Solutions Group
    www.cardinalsolutions.com

Maybe you are looking for

  • Why is my hard drive running all the time in Mountain Lion

    My hard drive is powering up far more than it ever did with Lion, and this of course is killing battery power rapidly. Any one know why my hard drive runs so often on the new OS? Thanks!

  • Firefox will not open a new page or tab when I click on certain links, why?

    Hi, I have been having a problem with firefox for the past month. Clicking on some links which open a new tab/window do not work. For example I cannot enlarge photos on ebay listings to have a closer look at the image. I just see a box at the bottom

  • Mails trun automatically to read status

    Dear All ,    We are facing one problem in our mail sender adapter. sometimes the mails in inbox  turn as read from unread status automatically.   We don't know what is the exact resaon. We are using IMAP protocol. Please Help us Regards Xi User

  • Untagged Fields

    Hello, When I open a form in LiveCycle 8.1 and go to the PDF Structure, there are no tags or anything showing except something that says PDF Structure can only be used in PDF forms that contain artwork. Since I created the forms in LiveCycle should t

  • How to view LKM SQL

    Newbie question: I'm trying to execute an Oracle MERGE LKM (using db link). I consistently get "ORA-00999 invalid view name" errors when executing the interface. I'd love to see the SQL ODI is generating along the way, but I am clueless about how to