This discussion is archived
9 Replies Latest reply: Nov 28, 2012 3:42 PM by 935660 RSS

making apex_util.get_print_document return an error message

935660 Newbie
Currently Being Moderated
We are using apex_util.get_print_document in a process to run a report something like this:
   l_report blob := null;
    l_report := apex_util.get_print_document (
        p_application_id      => :APP_ID,
        p_report_query_name   => 'report_query_name',
        p_report_layout_name  => 'report_layout_name',
        p_report_layout_type  => 'rtf',
        p_document_format     => 'rtf'
   if l_report is not null and dbms_lob.getlength(l_report) > 0 then
      apex_application.g_print_success_message := 'Report Created.<br>';        
      INSERT INTO reports (attachment, date_created, filename, mime_type) 
      VALUES (l_report, sysdate, 'report.rtf', 'text/rtf' );        
      apex_application.g_print_success_message := '<span style="color:#CC0000">There was a problem creating the report.</span><br>';    
   end if;  
And this works well most of the time. The problem is, if the report fails for some reason, apex_util.get_print_document gives no information whatsoever as to what went wrong. Is there any way at all we can find out what the problem was?

Application Express
Oracle Database 11g Enterprise Edition Release - 64bit Production


  • Correct Answers - 10 points
  • Helpful Answers - 5 points