Monday, March 14, 2016

Create XML Publisher report without RDF

Create XML Publisher report without RDF




First we have to create a data template for that. i have to give the sample data template..

-----> Create a data template on notepad like below

<?xml version = "1.0" encoding = "UTF-8"?>
<dataTemplate name="XXAR_CLIENT_DET_CASH_PYMT" version="1.0">
<properties>
<property name="debug_mode" value="on"/>
</properties>
 <parameters>
  <parameter name ="p_Workorder_From"          dataType="character"/>
   </parameters>
<dataQuery>
   <sqlStatement name="Q_CLNT_DET">
         select   distinct hca.account_number,account_name,
         hl.address4 Legacy_num,hca.attribute2 LOB,
         decode(hcsua.org_id,2,'US',22,'CAN') org_id,
         decode(hca.attribute12,'Y','CASH') Payment_Mode,
         trunc(TO_DATE(acrmv.start_date,'DD-MON-YY')) START_DATE,trunc(TO_DATE(acrmv.end_date,'DD-MON-YY')) END_DATE,
         acrm.name PAYMENT_METHOD,
         hcsua.site_use_code,
         hl.address1||','||hl.address2||','||hl.address3||','||hl.address4||','||hl.CITY||','||hl.state||','||hl.POSTAL_CODE||','||hl.country BILL_TO_ADDRESS
from
hz_locations hl,
HZ_PARTY_SITES hps,
hz_parties party,
HZ_CUST_ACCOUNTS hca,
HZ_CUST_ACCT_SITES_ALL hcasa,
HZ_CUST_SITE_USES_ALL hcsua,
HZ_CUSTOMER_PROFILES hcp,
ar_cust_receipt_methods_v acrmv,
ar_receipt_methods acrm
where
hps.location_id=hl.location_id
and party.party_id=hps.party_id
and party.party_id=hca.party_id
and hcasa.CUST_ACCOUNT_ID=hca.CUST_ACCOUNT_ID
and hcsua.CUST_ACCT_SITE_ID=hcasa.CUST_ACCT_SITE_ID
and hcp.SITE_USE_ID=hcsua.SITE_USE_ID
and hps.party_site_id=hcasa.party_site_id
and hca.cust_account_id = acrmv.customer_id
and acrmv.receipt_method_id = acrm.receipt_method_id
and hca.attribute12 = 'Y'
and hcsua.site_use_code = 'BILL_TO'
AND hcasa.BILL_TO_FLAG = 'P'
and rownum = 1
</sqlStatement>
  ---if we want one more sql query we add here......
</dataQuery>
<dataStructure>
    <group name="G_CLNT_DET" source="Q_CLNT_DET">
                    <element name ="ACCOUNT_NAME" value="ACCOUNT_NAME"/>
                    <element name ="ACCOUNT_NUMBER" value="ACCOUNT_NUMBER"/>
                    <element name ="LEGACY_NUM" value="LEGACY_NUM"/>       
                    <element name ="LOB" value="LOB"/>
                    <element name ="ORG_ID" value="ORG_ID"/>
                    <element name ="PAYMENT_MODE" value="PAYMENT_MODE"/>
                    <element name ="START_DATE" value="START_DATE"/>
                    <element name ="END_DATE" value="END_DATE"/>
                    <element name ="PAYMENT_METHOD" value="PAYMENT_METHOD"/>
                    <element name ="SITE_USE_CODE" value="SITE_USE_CODE"/>
                    <element name ="BILL_TO_ADDRESS" value="BILL_TO_ADDRESS"/>
-----if we have one more group we can add here.....
   </group>
</dataStructure>
<dataTrigger name="afterReport" source="xx.logic_func(:p_Workorder_From)"/>
</dataTemplate>
save it as .XML format

2. Once you create the Data definition, please create the respective concurrent program for this report if one does not already exists. Make sure the execute for this concurrent program should XDODTEXE no need to create executable,this is excises one. 

3. create concurrent program Make sure to enter the Token in the parameters screen. Also noted that this token should match to your parameters name in Data Template file.

4.Create request group and add to concurrent program.
5.attached the request group to responsibility.
6. go to srs window we will get the XML output.


Define the RTF Template using the Generated Data XML.

  .rtf File Regitration:
 =======================

1)Goto the XML Publisher Administrator Responsibility
2)Select Data Definations form
  Enter Data Defination Name = Enter Any Name 
  Code                          = Concurrent Program Short Name 
  Application                 = Any application
  startdate                         = Current Date
file                                = what ever ur create datatemplate file attached here

3)Copy the DataDefination name we have to add this to the Templete
4)Open the Templete Form
  Enter Templete Name : Any Name
  DataDefination      : enter data defination whatever we have created
  Code                : Concurrent Program Short Name
  Type                : rtf
  application         : any Application
  File                : Upload the .rtf file
  Laguage             : English
  Territory           : United States

5)Select Apply button

After register the .rtf file submit concurrent Program from SRS window system will 
automatically pick the .rtf file and generates  the Output.

If we want to customze the .rtf file we have to download by using templete , Customize then
upload the .rtf templete

No comments:

Post a Comment

How to improve blog performance

Improving the performance of a blog can involve a variety of strategies, including optimizing the website's technical infrastructure, im...