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;

Similar Messages

  • Facing issue in after report trigger in XML publisher

    HI All,
    I have a XML template in that i am calling a after report trigger like below :
    <dataTrigger name="afterReport" source="apps.testpkg.testupdate_fun(:HEADER_ID)"/>
    I am passing the header_id from my header block to the function.
    My Function looks like below:
    FUNCTION testupdate_fun(P_HEADER_ID IN NUMBER ) RETURN BOOLEAN AS
    BEGIN
    UPDATE TEST_TABLE SET PROCESS_FLAG='P' WHERE HEADER_ID=P_HEADER_ID;
    COMMIT;
    return true;
    EXCEPTION
    WHEN OTHERS THEN
    return false;
    END;
    The problem i am facing is it is updating only one record in the table.but in my header data block i am getting the details for more order numbers with header id like 1,2,3..., but it is updating only one header id in table, please help me out how to update record for all the header_id.
    Thanks

    Examples of combining all IDs into comma-separate list can be found here: http://www.oracle-base.com/articles/misc/string-aggregation-techniques.php . That list you need to send as parameter to the trigger. In the trigger you may split it again and update the records one-by-one, or you can build an EXECUTE IMMEDIATE statement to update the table, and in that statement the list can be used as a whole, no need to split it. Please, advise on which steps of this process you need more detailed assistance.

  • How to get XML format output from Hyperion Financial Reporting

    Dears,
    We are using Hyperion Financial Reporting to replace FSG in fusion. I found that Hyperion FR report can be exported to html/excel/pdf format. However, I would like the report to export to xml format.It means I only need the xml data source.
    Anyone who knows how to get the xml format output from Hyperion FR, is there any avaiable API?

    I think if you export the report, you will be able to open the .des file in Notepad/Wordpad and see xml content.

  • XML Publisher: where's XML Publisher output?

    Hi,
    The XML file created by report is in FND_Concurrent_Requests.outfile_name.
    Where's the XML Publisher output?
    I want copy the file generated (PDF or EXCEL) using utl_file.fcopy because bursting fail whe template is Type=>XSL-XML.
    Do your guys have any suggestion with this case? any input is very appreciated.
    thanks in advance
    Robert

    Welcome to the forums !
    Pl see if MOS Doc 305307.1 (How To Modify Print PO Report POXPOPDF With Custom Template) can help
    HTH
    Srini

  • Problem to display a negative number in XML Publisher output in excel

    Hi All,
    I am facing problem in displaying a negative number in XML Publisher output in excel.
    My requirement is that I have to display a negative number in brackets when the output is taken in excel format. Eg: If the value is -123 then i have to display it as (123).
    I have put these brackets using a formula column in the RDF, but it is the default functionality of excel that whenever there is a number in brackets then it automatically displays that as a negative value.
    Can anyone please help me how I can display this negative number within brackets and not as a negative digit. Is there any special tag or is there any formula which can be used to convert this into text and written in the Help text of RTF template.
    This is very urgent. If someone knows please reply asap.
    Regards,
    Shruti

    This is very urgent. If someone knows please reply asap.We are all volunteers here, so no ones questions are more urgent then other ones.
    If its that urgent it would have helped if you had chosen the correct forum to ask your question BI Publisher

  • How to embed an attachment in rtf(excel output) from oracle reports

    Hi,
    I have a requirement to embed an attachment from oracle reports(fnd_lobs) into rtf template which will generate excel output.
    Can you please provide me suggestions on this.
    Thanks,
    Kavya

    Hi,
    I will judge few records whether to display or not. i am using one variable to handle its display.
    i want to avoid using IF in my templated .
    Please suggest the best way
    Regards,
    Phani Reddy

  • Schedule in After-report Trigger

    I desperately need to be able to schedule a report in the after report trigger so that the completed report automatically gets sent to a printer. Is this possible? If not, its a real show stopper for my project. Please help! We are using BIEE 10.1.3.2 Stand alone version. Any help is GREATLY appreciated!

    Tim,
    Thank you so much for your reponse. I greatly appreciate the feedback.
    The biggest requirement of my project is to be able to automatically send the report output to a printer after it has rendered. It doesn't matter what I use to get it there (after report trigger, web services, pl/sql), as long as it is seemless to the user. So I don't necessarily need to use an after report trigger. Are those two suggestions still my best options?
    Do you happen to have an example of how to kick off a BI Publisher report from pl/sql?
    One last question, most of the report formats (html, excel, etc) open inside of the BI Publisher window, but when I run a PDF report, it automatically opens up a new browser to display it in. Is there a way to also open a PDF report inside of BI Publisher without opening a new browser? The report property, 'open report in new browser' has been disabled. Ideas?
    Thanks again! I am really grateful for your insight!!

  • Problem in writing 'After Report trigger'

    Hi All,
    Iam trying to insert values into database table after running the report.
    but the values are not inserted into the table.
    Here is the code in 'After Report trigger'
    function AfterReport return boolean is
    begin
    insert into reports_log values('poorders',user,sysdate,'Y');
    commit;
    return (TRUE);
    end;
    Thanks in Advance

    Tested one of my reports and found:
    the After Report Trigger does not fire (to insert a table) in Report Builder (6i) but it fires when it's invoked from Apex.
    It you run your report in Froms or Apex or...., try over there.

  • Save the pdf file in after report trigger

    Hi friends,
    How can I save the report PDF result file in table from after report triger?
    I am using Oracle report 10g. So is it possible to do that.
    thanks

    You can install the pluggable database destination from OTN.
    http://www.oracle.com/technology/products/reports/pluginxchange/index.html
    After deploying it on the reports server you can print the PDF to a BLOB column of a table in the database.
    An other "older" option is described over here:
    http://technology.amis.nl/blog/?p=576
    Hope this helps
    Marcos

  • DELETE  in After report trigger

    Please help us resolve the following problem in a 6i report.
    The report had an After report trigger to delete the records from the same table used in the driver query. The report is launched thru a url to create a pdf file. The PDF is generated correctly for some users but for many others the PDF is generated with no data. When the delete statement is commented out, everybody get the PDF with data. All users have the same Acrobat Reader and IE version.
    Any idea why this is happening ?
    Appreciate your help
    Thanks

    Navneeth, Dmytro
    Thanks for your replies
    The report is for generating some sort of certificates ( in pdf format) from a staging table. If the certificate is issued, the record is to be deleted. So the report is different in each run.
    The real issue is the report behavior is not consistent from one machine to another. For the same set of data in the staging table for PC1 the PDF is generated and processed records are deleted. But in PC2 records are processed, records are deleted but the PDF has no data.
    We tried to use a global temp. table, didn't help either.
    In the before report trigger
    insert into gt_table select * from staging_table
    commit
    Report query modified to get data from gt_table
    After report trigger deletes records from staging_table
    The PDF data is seen in PC1 but not in PC2
    When the after report trigger is commented out, PDF launched in both machines contain data.
    There are many reports which generates PDF file without a delete trigger and they all work well.
    Is this problem happening because the records are getting deleted before pdf is launched? Or any type of browser (IE) or Acrobat reader settings required ?
    The deletes can be handled in the front end application after launching the report url but preferred to keep it in the reports to avoid deleting records in case there's a problem with report server and records are not processed.
    Thanks you for your help

  • FND_REQUEST.SUBMIT_REQUEST is not working in After Report Trigger Reports6i

    Hi Guys,
    I am calling the another conc program in After report trigger using FND_REQUEST.SUBMIT_REQUEST. The below are the statement which i use in my program.
    req_id := FND_REQUEST.SUBMIT_REQUEST('APPL_SHORT','CONC_SHORT',NULL,NULL,FALSE);
    I have also use the SRW.USER_EXIT('FND SRWINIT') in Before Report Trigger and SRW.USER_EXIT('FND SRWEXIT') in After Report Trigger also.
    I am getting the error in Log file saying that
    REP-0736: There exist uncompiled program unit(s).
    REP-1247: Report Contains uncompiled PL/SQL.
    Quick Response is highly appreciated.
    Thanks in Advance.
    Regards
    Madhan.S

    Hi Sawwan,
    I was compiled in Unix platform also. If i comment that FND_REQUEST.SUBMIT_REQUEST line it executes fine. It gives the same error in Unix also.
    Can anyone pls help this issue.
    Thanks in Advance.
    Regards
    Madhan.S

  • Error in After Report Trigger

    Hi,
    I've developed a report in HRMS for my client which collated the Vacation Accrual data of all employees. When i run the report for all employees which is an optional parameter it throwing the below error.
    REP-0300: ORACLE error occurred.
    REP-0069: Internal error
    In-process job terminated:Terminated with error:
    REP-300:
    During debugging i found that in the After Report Trigger , after the return statement, the below error is being thrown. I couldn't identify the exact source of the error. Any help on this would be much appreciated. Below is the After Report Trigger code.
    function AfterReport return boolean is
    begin
    srw.MESSAGE (12345, 'After Report - Before Return');
    return (TRUE);
    srw.MESSAGE (12345, 'After Report - After Return');
    end;
    Thanks
    Elango

    After spending a lot of time in analyzing, i ripped apart each and every part of the report and found a function where am doing a varchar to date conversion. Then i ran the query individually and picked up the below error.
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    Then i identified the record which has incorrect data and modified it thru applications. Oracle Internal error basically arises due to datatype mismatch and its always better to use exception blocks with log messages wherever its applicable.
    Thanks
    Elango.

  • How to reference the total pages in a the after-report trigger

    I need to call a procedure in my after report trigger, and send the total number of pages as a parameter. However, a bind reference only applies to columns or parameters.
    I have the total pages displayed on my report, I just can't reference that field in my trigger.
    Does anyone have any ideas?
    Here is a link to my ultimate goal.
    Telling Form the number of pages in a report

    If any body is curious, I found a work around in Metalink that is working for me now.
    Search for Doc ID 130432.1

  • Update statement in After report trigger

    Hi
    I've written an update statement on a standard table to update one of its attributes in after report trigger.
    And then commit.
    I tried running the report without moving to reports top. The table was not updated.
    What could have gone wrong?
    Thanks
    Regards
    BalaKrishna

    Could you provide the UPDATE statements?

  • Problems with After Report trigger Updating using User-defined functions

    Hi,
    I have a report which uses SQL to select data that uses a user-defined stored function in the WHERE clause.
    I use the same SQL in the After Report trigger with and UPDATE statement to flag all records selected as being run.
    Data is being selected by the report no problem, but the records are not being updated. In a test, If I remove the conditions using the user functions, the records update as expected. In Live conditions I must have these conditions in the script.
    I originally tried putting the UPDATE in a formual column, but that would not fire on records where that page was not paged through (or paged to end) in the Runtime Previewer.
    Can anyone advise?

    In case anyone is interested.
    The issue was that the stored functions have roles assigned for security.
    PL/SQL for After Report doesn't seem to recognise the roles having been assigned for the report, so the implicit cursor update/select I had wouldn't work.
    I changed the SELECT into an explicit CURSOR and introduced a FOR LOOP, keeping the UPDATE as an implicit statement.
    I know see this was more of a PL/SQL issues than a report one, but such is life. So if anyone feels the urge to move it to the PL/SQL forum, then feel free!!
    Have a problem free afternoon. :-)

Maybe you are looking for