在Form中调用请求并直接打印结果

请求打印,一般都是需要提交请求,然后在请求界面查看输出,将打印内容显示在浏览器上

现可在通过调用请求后直接打印到浏览器上,
实现步骤如下:
  ---设置请求打印模板
     l_req_bool := fnd_request.add_layout(template_appl_name => 'CUX',
                                         template_code      => 'CUXPOREQPRINT',
                                         template_language  => 'zh',
                                         template_territory => 'CN',
                                         output_format      => 'PDF');
  --提交请求
    l_req_id := fnd_request.submit_request('CUX',
                                           'CUXPOREQPRINT',
                                           NULL,
                                           NULL,
                                           FALSE,
                                           nvl(:po_req_hdr.segment1,
                                               NULL));
   COMMIT;
-          -等待请求完成
 IF l_req_id IS NULL OR l_req_id = 0 THEN
     fnd_message.set_string('打印提交失败' );
     fnd_message.show; 
     RAISE form_trigger_failure;
 ELSE
    l_wait_bool := Fnd_Concurrent.Wait_For_Request(l_req_id,
                                              1,
                                              0,
                                              l_Phase,
                                              l_Status,
                                              l_Dev_Phase,
                                              l_Dev_Status,
                                              l_Message);
 
        --调用标准pll文件中的自动打印功能                
       editor_pkg.report(l_req_id,'Y');
               END IF;
 
在form中添加标准pll文件:
      FNDCONC
 
 
 
posted @ 2016-12-27 00:15  旺仔丶小馒头  阅读(670)  评论(0编辑  收藏  举报