Follow us: Connect on YouTube Connect on YouTube Connect on YouTube

Pages

Saturday, 11 November 2017

Display Parameter Values in RTF Template




We can build XML report by using RDF (By using report builder) and Data templates

Here we are going learn in both ways how show Parameter values 


Showing parameter values in RTF template by RDF report 


Take formula column at report level write the following coding in PLSQL block

Begin
Return (:Parameter);
End;

Refer the XML tag into the RTF 


Showing parameter values in RTF template by data template 

Here we can show in 2 steps:


Step1:
 
Create new SQL in Data template

<sqlStatement name="Q_PARAM_DET">
<![CDATA[
  SELECT  TO_CHAR (TO_DATE (:P_FROM_PO_DATE, 'YYYY/MM/DD HH24:MI:SS'),'DD-MON-YYYY') from_date
        , TO_CHAR (TO_DATE (:P_TO_PO_DATE, 'YYYY/MM/DD HH24:MI:SS'), 'DD-MON-YYYY')  to_date
        , fnd_global.conc_request_id request_id
        ,(SELECT user_name
            FROM fnd_user
           WHERE user_id = fnd_global.user_id) run_by
        , to_char(sysdate,'DD-MON-YYYY HH:MI:SS AM') sys_date
   FROM DUAL
]]>
</sqlStatement>

Step2:

Create data source shown below


<group name="G_PARAM_DET" source="Q_PARAM_DET">    
     <element name="from_date"   datatype="VARCHAR2"     value="from_date"/>
     <element name="to_date"     datatype="VARCHAR2"     value="to_date"/>
     <element name="request_id"  datatype="NUMBER"       value="request_id"/>
     <element name="run_by"      datatype="VARCHAR2"     value="run_by"/>
     <element name="sys_date"    datatype="VARCHAR2"     value="sys_date"/>       
   </group>



Share this article :

0 comments:

Post a Comment