Translate

Sunday, December 24, 2017

sending report output (PDF) as attachment in customizable email

1. Create RDF file using the attached template (XXTEST_REP.rdf)
2. You have to rename the file name to your report file name.
3. You have to set the following formulas inside the RDF file (PLSQL Formula).
4. Use the BODY_TEXT formula to return the email HTML body.
5. You can customize FORMAT_BODY function to customize body text using HTML tags.
6. Use PUT_LINE to add new text to email body ends with BR(Enter).
7. Use NEW_LINE function to add new empty line to email body.
8. You have to set attachment file name using REPORT_NAME.
9. You have to copy RTF file to the same path with RDF file on the server.
10. You have to set report application top inside RTF_FILE_PATH formula (FND_TOP in our sample and PER_TOP for human resources application,…..etc).
11. You have to set the RTF file path/name on the server using RTF_FILE_PATH. 
12. You have to change the following query without changing the group name (G_BURSTING).  

13. Upload the attached bursting control file (BURSTING_CONTROL.xml) when you define the template data definition (Update Mode) .


BURSTING_CONTROL.xml:
<xapi:requestset type="bursting" xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
<xapi:request select="/XXTEST_REP/G_BURSTING">
    <xapi:delivery>
      <xapi:email reply-to="" from="erp@xyz.com" port="25" server="10.10.100.41">
      <xapi:message subject="${EMAIL_SUBJECT}" content-type="text/html" attachment="true" to="${SEND_TO}" cc="${CC_SEND_TO}" id="123">

         <![CDATA[<HTML> <BODY> ${BODY_TEXT}</BODY></HTML> ]]>
      </xapi:message>

      </xapi:email>

    </xapi:delivery>


<xapi:document delivery="123" output-type="pdf" output="${REPORT_NAME}">
    <xapi:template type="rtf" location="${RTF_FILE_PATH}"> </xapi:template>
</xapi:document>
</xapi:request>
</xapi:requestset>


No comments:

Post a Comment

Featured Post

To Add user Responsibility like another user

DECLARE    lc_user_name              VARCHAR2 (100) := 'ALI';    lc_resp_appl_short_name   VARCHAR2 (100) := 'SYSADMIN'; ...