1 Reply Latest reply: Mar 6, 2014 4:11 AM by Pooja D RSS

    GET_PRINT_DOCUMENT() signature 2 returning null

    Pooja D

      Hi,

       

      I want to send some predefined reports via email using dbms job. For this, i am trying to use APEX_UTIL.GET_PRINT_DOCUMENT function signature 2 which returns a document as BLOB using pre-defined report query and pre-defined report layout. I have created a report layout(in rtf) and report query (with report in pdf format) in Apex Shared components. Query works fine (returns pdf report) when I check it using Test Report button in report query.

      However, When I call GET_PRINT_DOCUMENT(), it returns null.

       

      I am using Apex 4.2.2 and i call it as below.

       

      apex_util.set_security_group_id(l_workspace_id);

      l_document := APEX_UTIL.GET_PRINT_DOCUMENT

              (

              p_application_id=>144,

              p_report_query_name=>'EMP_REP',

              p_report_layout_name =>'EMP_REP',

              p_report_layout_type=>'rtf',

              P_DOCUMENT_FORMAT=>'pdf'  

              );

       

      Any idea what's the issue and how can i send a report via email?