1 Reply Latest reply on May 2, 2012 8:58 AM by Billy~Verreynne

    Apex_util.get_print_Document not working outside apex environment

      I am working on one of the assignment in Apex 4.0.2 .

      The requirement is to dynamically generate reports and mail to User using the Scheduler program(Pl/sql) -> dbms_scheduler.
      I have used BI publisher to create the template and xml data for the report(Excel) and used Apex_util.get_print_Document
      in the scheduler program (which is written outside Apex), but this is not working properly,sends blank report to email.

      Please suggest how to set the apex session and use Apex_util.get_print_Document to work properly outside apex env.
        • 1. Re: Apex_util.get_print_Document not working outside apex environment
          Apex (PL/SQL web-enabled) code needs to execute inside an Oracle server session that has been properly and correctly initialised for executing web enabled PL/SQL code.

          An example of how to execute such PL/SQL by intialising a proper environment, is shown in {message:id=2251131}.

          Note that this will not be able to execute Apex pages (via the flow engine) that are not public - that needs a proper authenticated Apex web session. Which could be a tad complex to emulate in this fashion.
          1 person found this helpful